Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Notifier Class Reference

Public Member Functions

 __init__ (self, name, logger=None)
 
 __str__ (self)
 
 debug (self, debugString)
 
 debugCall (self, debugString='')
 
 debugStateCall (self, obj=None, fsmMemberName='fsm', secondaryFsm='secondaryFSM')
 
 error (self, errorString, exception=Exception)
 
 getDebug (self)
 
 getInfo (self)
 
 getLogging (self)
 
 getOnlyTime (self)
 
 getSeverity (self)
 
 getTime (self)
 
 getWarning (self)
 
 info (self, infoString)
 
 setDebug (self, bool)
 
 setInfo (self, bool)
 
 setLogging (self, bool)
 
 setServerDelta (self, delta, timezone)
 
 setSeverity (self, severity)
 
 setWarning (self, bool)
 
 warning (self, warningString)
 

Public Attributes

 serverDelta
 

Static Public Attributes

int serverDelta = 0
 
 showTime = ConfigVariableBool('notify-timestamp', False)
 
 streamWriter = None
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
name,
logger = None )
Parameters:
    name (str): a string name given to this Notifier instance.
    logger (Logger, optional): an optional Logger object for
        piping output to.  If none is specified, the global
        :data:`~.LoggerGlobal.defaultLogger` is used.

Member Function Documentation

◆ __str__()

__str__ ( self)
Print handling routine

◆ debug()

debug ( self,
debugString )
Issue the debug message if debug flag is on

◆ debugCall()

debugCall ( self,
debugString = '' )
If this notify is in debug mode, print the time of the
call followed by the notifier category and
the function call (with parameters).

◆ debugStateCall()

debugStateCall ( self,
obj = None,
fsmMemberName = 'fsm',
secondaryFsm = 'secondaryFSM' )
If this notify is in debug mode, print the time of the
call followed by the [fsm state] notifier category and
the function call (with parameters).

◆ error()

error ( self,
errorString,
exception = Exception )
Raise an exception with given string and optional type:
Exception: error

◆ getDebug()

getDebug ( self)
Return whether the printing of debug messages is on or off

◆ getInfo()

getInfo ( self)
Return whether the printing of info messages is on or off

◆ getLogging()

getLogging ( self)
Return 1 if logging enabled, 0 otherwise

◆ getOnlyTime()

getOnlyTime ( self)
Return the time as a string.
The Only in the name is referring to not showing the date.

◆ getSeverity()

getSeverity ( self)

◆ getTime()

getTime ( self)
Return the time as a string suitable for printing at the
head of any notify message

◆ getWarning()

getWarning ( self)
Return whether the printing of warning messages is on or off

◆ info()

info ( self,
infoString )
Print the given informational string, if info flag is on

◆ setDebug()

setDebug ( self,
bool )
Enable/Disable the printing of debug messages

◆ setInfo()

setInfo ( self,
bool )
Enable/Disable informational message  printing

◆ setLogging()

setLogging ( self,
bool )
Set the logging flag to int (1=on, 0=off)

◆ setServerDelta()

setServerDelta ( self,
delta,
timezone )
Call this method on any Notify object to globally change the
timestamp printed for each line of all Notify objects.

This synchronizes the timestamp with the server's known time
of day, and also switches into the server's timezone.

◆ setSeverity()

setSeverity ( self,
severity )

◆ setWarning()

setWarning ( self,
bool )
Enable/Disable the printing of warning messages

◆ warning()

warning ( self,
warningString )
Issue the warning message if warn flag is on

Member Data Documentation

◆ serverDelta [1/2]

int serverDelta = 0
static

◆ serverDelta [2/2]

serverDelta

◆ showTime

showTime = ConfigVariableBool('notify-timestamp', False)
static

◆ streamWriter

streamWriter = None
static