Class ConsoleLog

Console logging. Writes logs to console output.

BaseLog implements CakeLogInterface
Extended by ConsoleLog
Package: Cake\Log\Engine
Copyright: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
License: MIT License
Location: Cake/Log/Engine/ConsoleLog.php

Properties summary

Inherited Properties

Method Summary

  • __construct() public
    Constructs a new Console Logger.
  • write() public
    Implements writing to console.

Method Detail

__construct()source public

__construct( array $config array() )

Constructs a new Console Logger.

Config

  • types string or array, levels the engine is interested in
  • scopes string or array, scopes the engine is interested in
  • stream the path to save logs on.
  • outputAs integer or ConsoleOutput::[RAW|PLAIN|COLOR]

Parameters

array $config optional array()
Options for the FileLog, see above.

Throws

CakeLogException

Overrides

BaseLog::__construct()

write()source public

write( string $type , string $message )

Implements writing to console.

Parameters

string $type
The type of log you are making.
string $message
The message you want to log.

Returns

boolean
success of write.

Methods inherited from BaseLog

config()source public

config( array $config array() )

Sets instance config. When $config is null, returns config array

Config

  • types string or array, levels the engine is interested in
  • scopes string or array, scopes the engine is interested in

Parameters

array $config optional array()
engine configuration

Returns

array

Properties detail

$_outputsource

protected ConsoleOutput

Output stream

null

© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/2.10/class-ConsoleLog.html