Module EDLogFile :: Class EDLogFile
[hide private]
[frames] | no frames]

Class EDLogFile

source code

object --+
         |
        EDLogFile

This file takes care of creating a log file and writes messages to the log file.

Instance Methods [hide private]
 
__init__(self, _pyStrLogFileName=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__createLogFile(self)
This private method creates the log file.
source code
 
write(self, _pyStrLogMessage)
This method writes a message to the log file.
source code
 
setLogFileName(self, _pyStrLogFilePath) source code
 
setLogFileOff(self)
This method turns off logging to a file.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, _pyStrLogFileName=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • _pyStrLogFileName (python string) - Optional path to or name of the log file.
Overrides: object.__init__

__createLogFile(self)

source code 

This private method creates the log file. If the log file name or path is not set a name of the type "EDNA_YYMMDD-HHMM.log" is used.

write(self, _pyStrLogMessage)

source code 

This method writes a message to the log file. If the log file name is not set messages are cached up to the limit __iMaxLogCache defined in the constructor.

Once a file name of the log file has been defined all cached log messages are flushed to the log file.

This allow log messages to be written to the log file even if the log messages are issued before the name of the log file has been determined by the EDNA application.

Parameters:
  • _pyStrLogMessage (python string) - a log message

setLogFileName(self, _pyStrLogFilePath)

source code 
Parameters:
  • _pyStrLogFilePath - The name or path of the log file
  • _pyStrLogMessage (python string)