\nre\coreLogger

Class to log messages to different targets.

Summary

Methods
Properties
Constants
__construct()
log()
disableAutoLogToScreen()
No public properties found
LOGMODE_AUTO
LOGMODE_SCREEN
LOGMODE_PHP
No protected methods found
No protected properties found
N/A
logToScreen()
logToPhp()
getAutoLogMode()
$autoLogToScreenDisabled
N/A

Constants

LOGMODE_AUTO

LOGMODE_AUTO

Log mode: Detect automatic

LOGMODE_SCREEN

LOGMODE_SCREEN

Log mode: Print to screen

LOGMODE_PHP

LOGMODE_PHP

Log mode: Use PHP-logging mechanism

Properties

$autoLogToScreenDisabled

$autoLogToScreenDisabled : boolean

Do not auto-log to screen

Type

boolean

Methods

__construct()

__construct() 

Construct a new logger.

log()

log(string  $message, integer  $logMode = self::LOGMODE_SCREEN) 

Log a message.

Parameters

string $message

Message to log

integer $logMode

Log mode to use

disableAutoLogToScreen()

disableAutoLogToScreen() 

Disable logging to screen when the log mode is automatically detected.

logToScreen()

logToScreen(string  $message) 

Print a message to screen.

Parameters

string $message

Message to print

logToPhp()

logToPhp(string  $message) 

Log a message by using PHP-logging mechanism.

Parameters

string $message

Message to log

getAutoLogMode()

getAutoLogMode() : integer

Detect log mode automatically by distinguishing between production and test environment.

Returns

integer —

Automatically detected log mode