Reality Logger

From BF2 Technical Information Wiki
Revision as of 23:10, 9 September 2017 by UTurista (talk | contribs) (Creating page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The Reality Logger is used to easily log to a file.

Creating a logger

realitylogger.createLogger( name, path, fileName, continous )

  • name - a unique key used to select the logger
  • Path - Diretory the log file gets created in
  • FileName - Name of the file created. If not contionous should specify a date format (strftime format)
  • Continous - Whether to log to one file all the time or create new one every round


createLogger may be called many times with the same key, repeating calls will be properly filtered out. It is not required to put it in an init() function.


Using a logger

To acquire a logger: X = realitylogger.RealityLogger[key]

Basic logging commands:

X.logLine(line)

X.logLines(lines)