Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

(no description)

Author: Moxiecode
Copyright: Copyright © 2005, Moxiecode Systems AB, All rights reserved.
File Size: 278 lines (6 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

Moxiecode_Logger:: (2 methods):
  __construct()
  Moxiecode_Logger()

name:: (24 methods):
  setLevel()
  getLevel()
  setPath()
  getPath()
  setFileName()
  getFileName()
  setFormat()
  getFormat()
  setMaxSize()
  getMaxSize()
  setMaxFiles()
  getMaxFiles()
  debug()
  info()
  warn()
  error()
  fatal()
  isDebugEnabled()
  isInfoEnabled()
  isWarnEnabled()
  isErrorEnabled()
  isFatalEnabled()
  _logMsg()
  toOSPath()


Class: Moxiecode_Logger  - X-Ref

Logging utility class. This class handles basic logging with levels, log rotation and custom log formats. It's
designed to be compact but still powerful and flexible.

__construct()   X-Ref
Constructs a new logger instance.


Moxiecode_Logger()   X-Ref
Old syntax of class constructor. Deprecated in PHP7.


Class: name  - X-Ref

setLevel($level)   X-Ref
Sets the current log level, use the MC_LOGGER constants.

param: int $level Log level instance for example MC_LOGGER_DEBUG.

getLevel()   X-Ref
Returns the current log level for example MC_LOGGER_DEBUG.

return: int Current log level for example MC_LOGGER_DEBUG.

setPath($path)   X-Ref
No description

getPath()   X-Ref
No description

setFileName($file_name)   X-Ref
No description

getFileName()   X-Ref
No description

setFormat($format)   X-Ref
No description

getFormat()   X-Ref
No description

setMaxSize($size)   X-Ref
No description

getMaxSize()   X-Ref
No description

setMaxFiles($max_files)   X-Ref
No description

getMaxFiles()   X-Ref
No description

debug($msg)   X-Ref
No description

info($msg)   X-Ref
No description

warn($msg)   X-Ref
No description

error($msg)   X-Ref
No description

fatal($msg)   X-Ref
No description

isDebugEnabled()   X-Ref
No description

isInfoEnabled()   X-Ref
No description

isWarnEnabled()   X-Ref
No description

isErrorEnabled()   X-Ref
No description

isFatalEnabled()   X-Ref
No description

_logMsg($level, $message)   X-Ref
No description

toOSPath($path)   X-Ref
Converts a Unix path to OS specific path.

param: String $path Unix path to convert.