# \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

File
  core/Logger.inc
Package
  Default
Class hierarchy
  \nre\core\Logger

## Tags

author | coderkun olli@coderkun.de

## Constants

### LOGMODE_AUTO

    LOGMODE_AUTO

Log mode: Detect automatic

#

## Tags

None found

### LOGMODE_SCREEN

    LOGMODE_SCREEN

Log mode: Print to screen

#

## Tags

None found

### LOGMODE_PHP

    LOGMODE_PHP

Log mode: Use PHP-logging mechanism

#

## Tags

None found

## Properties

### $autoLogToScreenDisabled

    $autoLogToScreenDisabled : boolean

Do not auto-log to screen

#### Type

boolean

#

## Tags

None found

## Methods

### __construct()

    __construct()

Construct a new logger.

#

## Tags

None found

### log()

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

Log a message.

#### Parameters

string | $message | Message to log
integer | $logMode | Log mode to use

#

## Tags

None found

### disableAutoLogToScreen()

    disableAutoLogToScreen()

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

#

## Tags

None found

### logToScreen()

    logToScreen(string  $message)

Print a message to screen.

#### Parameters

string | $message | Message to print

#

## Tags

None found

### logToPhp()

    logToPhp(string  $message)

Log a message by using PHP-logging mechanism.

#### Parameters

string | $message | Message to log

#

## Tags

None found

### getAutoLogMode()

    getAutoLogMode() : integer

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

#### Returns

integer —

Automatically detected log mode

#

## Tags

None found

### Logger.inc