TSDuck v3.46-4964
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
tsduck.AbstractAsyncReport Class Reference

An abstract Report class which can be derived by applications to get log messages. More...

Inheritance diagram for tsduck.AbstractAsyncReport:
Collaboration diagram for tsduck.AbstractAsyncReport:

Public Member Functions

 __init__ (self, severity=Report.Info, sync_log=False, log_msg_count=0)
 Constructor, starts the async log thread.
 debug (self, message)
 Log a messages at debug level.
 delete (self)
 Explicitly free the underlying C++ object.
 error (self, message)
 Log a messages at error level.
 info (self, message)
 Log a messages at info level.
 log (self, severity, message)
 Log a message to the report.
 setMaxSeverity (self, severity)
 Set the maximum severity of the report.
 terminate (self)
 Synchronously terminates the async log thread.
 verbose (self, message)
 Log a messages at verbose level.
 warning (self, message)
 Log a messages at warning level.

Static Public Member Functions

 header (severity)
 Formatted line prefix header for a severity.

Static Public Attributes

int Debug = 1
 First debug level.
int Error = -3
 Regular error.
int Fatal = -5
 Fatal error, typically aborts the application.
int Info = -1
 Information message.
int Severe = -4
 Severe errror.
int Verbose = 0
 Verbose information.
int Warning = -2
 Warning message.

Protected Member Functions

 _getNative (self)
 Get the native object.
 _setNative (self, obj)
 Set the native object.

Detailed Description

An abstract Report class which can be derived by applications to get log messages.

This class uses the C++ class ts.AsyncReport which asynchronously logs messages in a separate thread. The Python callback is invoked in a common C++ thread.

Constructor & Destructor Documentation

◆ __init__()

tsduck.AbstractAsyncReport.__init__ ( self,
severity = Report.Info,
sync_log = False,
log_msg_count = 0 )

Constructor, starts the async log thread.

Parameters
severityInitial severity.
sync_logSynchronous log.
log_msg_countMaximum buffered log messages.

Member Function Documentation

◆ delete()

tsduck.AsyncReport.delete ( self)
inherited

Explicitly free the underlying C++ object.

After this call, the object becomes unusable. Most usages are unpredictable but most likely will do nothing.

Returns
None.

Reimplemented from tsduck.NativeObject.

◆ terminate()

tsduck.AsyncReport.terminate ( self)
inherited

Synchronously terminates the async log thread.

Returns
None.

◆ header()

tsduck.Report.header ( severity)
staticinherited

Formatted line prefix header for a severity.

Parameters
severitySeverity value.
Returns
A string to prepend to messages. Empty for Info and Verbose levels.

◆ setMaxSeverity()

tsduck.Report.setMaxSeverity ( self,
severity )
inherited

Set the maximum severity of the report.

Parameters
severitySeverity level.
Returns
None.

◆ log()

tsduck.Report.log ( self,
severity,
message )
inherited

Log a message to the report.

Parameters
severitySeverity level of the message.
messageMessage to report.
Returns
None.

◆ error()

tsduck.Report.error ( self,
message )
inherited

Log a messages at error level.

Parameters
messageMessage to report.
Returns
None.

◆ warning()

tsduck.Report.warning ( self,
message )
inherited

Log a messages at warning level.

Parameters
messageMessage to report.
Returns
None.

◆ info()

tsduck.Report.info ( self,
message )
inherited

Log a messages at info level.

Parameters
messageMessage to report.
Returns
None.

◆ verbose()

tsduck.Report.verbose ( self,
message )
inherited

Log a messages at verbose level.

Parameters
messageMessage to report.
Returns
None.

◆ debug()

tsduck.Report.debug ( self,
message )
inherited

Log a messages at debug level.

Parameters
messageMessage to report.
Returns
None.

◆ _setNative()

tsduck.NativeObject._setNative ( self,
obj )
protectedinherited

Set the native object.

This is typically done by subclass constructors.

Parameters
objAddress of the C++ native object to store.

◆ _getNative()

tsduck.NativeObject._getNative ( self)
protectedinherited

Get the native object.

This is typically used by subclasses.

Returns
Address of the C++ native object.

The documentation for this class was generated from the following file:
  • tsduck.py