[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/ -> Logger.php (summary)

(no description)

File Size: 164 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Logger:: (8 methods):
  __construct()
  getInstance()
  error()
  debug()
  deprecated()
  log()
  getLogfile()
  writeLogLines()


Class: Logger  - X-Ref

__construct($facility)   X-Ref
Logger constructor.

param: string $facility The type of log

getInstance($facility = self::LOG_ERROR)   X-Ref
Return a Logger instance for the given facility

param: string $facility The type of log
return: Logger

error($message, $details = null, $file = '', $line = 0)   X-Ref
Convenience method to directly log to the error log

param: string $message The log message
param: mixed $details Any details that should be added to the log entry
param: string $file A source filename if this is related to a source position
param: int $line A line number for the above file
return: bool has a log been written?

debug($message, $details = null, $file = '', $line = 0)   X-Ref
Convenience method to directly log to the debug log

param: string $message The log message
param: mixed $details Any details that should be added to the log entry
param: string $file A source filename if this is related to a source position
param: int $line A line number for the above file
return: bool has a log been written?

deprecated($message, $details = null, $file = '', $line = 0)   X-Ref
Convenience method to directly log to the deprecation log

param: string $message The log message
param: mixed $details Any details that should be added to the log entry
param: string $file A source filename if this is related to a source position
param: int $line A line number for the above file
return: bool has a log been written?

log($message, $details = null, $file = '', $line = 0)   X-Ref
Log a message to the facility log

param: string $message The log message
param: mixed $details Any details that should be added to the log entry
param: string $file A source filename if this is related to a source position
param: int $line A line number for the above file
return: bool has a log been written?

getLogfile($date = false)   X-Ref
Construct the log file for the given day

param: false|string|int $date Date to access, false for today
return: string

writeLogLines($lines)   X-Ref
Write the given lines to today's facility log

param: string[] $lines the raw lines to append to the log
return: bool true if the log was written