Panda3D
Public Member Functions | Static Public Attributes | List of all members
Notifier Class Reference

Public Member Functions

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

Static Public Attributes

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

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  name,
  logger = None 
)
name is a string
logger is a Logger

Create a new instance of the Notifier class with a given name
and an optional Logger class for piping output to. If no logger
specified, use the global default

Member Function Documentation

◆ __str__()

def __str__ (   self)
Print handling routine

◆ debug()

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

◆ debugCall()

def 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()

def 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()

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

◆ getDebug()

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

◆ getInfo()

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

◆ getLogging()

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

◆ getOnlyTime()

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

◆ getSeverity()

def getSeverity (   self)

◆ getTime()

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

◆ getWarning()

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

◆ info()

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

◆ setDebug()

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

◆ setInfo()

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

◆ setLogging()

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

◆ setServerDelta()

def 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()

def setSeverity (   self,
  severity 
)

◆ setWarning()

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

◆ warning()

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

Member Data Documentation

◆ serverDelta

int serverDelta = 0
static

◆ showTime

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

◆ streamWriter

streamWriter = None
static