Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.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.