Logger Class

Table of Contents

Logger Class

This class will implement log functions (writing debug data to a log file) in order to ease debug in Movim development process.

By default, the logfile name will be hardcoded as 'log/movim.log'. It may be read from a server configuration variable in future implementations.

Methods

Log

Logger::log(<level>, <message>) will write <message> in the log file if the server config variable “logLevel” is superior or equal to <level>.

Recommended <level> use in Movim:

  • 0 is reserved for “no log message”. Don't use it unless you want to force your message to be logged, independantly of the server configuration.
  • 4 is recommended for function names and actions
  • 7 is intended to be the “maximum” verbosity, where everything is dumped (data… )

In Other Languages
Translations of this page: