Skip to content

icms_core_Logger

Raimondas Rimkevičius edited this page Mar 9, 2020 · 1 revision
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!

icms_core_Logger

Proxy logger class to add some compatibility stuff with older ICMS versions

  • Class name: icms_core_Logger
  • Namespace:
  • Parent class: Monolog\Logger

Properties

$timers

public array $timers = []

Started timers list

  • Visibility: public

Methods

instance

static icms_core_Logger::instance()

Get a instance for default logger

  • Visibility: public
  • This method is static.

enableRendering

mixed icms_core_Logger::enableRendering()

Enable logger output

  • Visibility: public

disableRendering

mixed icms_core_Logger::disableRendering()

Disable logger output rendering.

  • Visibility: public

getDebugHandlersFromConfig

\ProcessableHandlerInterface[] icms_core_Logger::getDebugHandlersFromConfig()

Gets handlers from env variable DEBUG_TOOL

  • Visibility: protected

log

mixed icms_core_Logger::log(mixed level, mixed message, array context)
  • Visibility: public

Arguments

  • level mixed
  • message mixed
  • context array

disableLogger

mixed icms_core_Logger::disableLogger()

Disabling logger

  • Visibility: public

startTime

mixed icms_core_Logger::startTime(string name)

Start a timer

  • Visibility: public

Arguments

  • name string - <p>name of the timers</p>

stopTime

mixed icms_core_Logger::stopTime(string name)

Stop a timer and prints to log

  • Visibility: public

Arguments

  • name string - <p>name of the timers</p>

addQuery

mixed icms_core_Logger::addQuery(string sql, string error, int errno)

Log a database query

  • Visibility: public

Arguments

  • sql string - <p>SQL string</p>
  • error string - <p>error message (if any)</p>
  • errno int - <p>error number (if any)</p>

addBlock

mixed icms_core_Logger::addBlock(string name, bool cached, int cachetime)

Log display of a block

  • Visibility: public

Arguments

  • name string - <p>name of the block</p>
  • cached bool - <p>was the block cached?</p>
  • cachetime int - <p>cachetime of the block</p>

addExtra

mixed icms_core_Logger::addExtra(string name, int msg)

Log extra info

  • Visibility: public

Arguments

  • name string - <p>name</p>
  • msg int - <p>message</p>

addDeprecated

mixed icms_core_Logger::addDeprecated(string msg)

Marks as deprecated

  • Visibility: public

Arguments

  • msg string - <p>Message/reason for deprecating</p>

handleError

mixed icms_core_Logger::handleError(int errorNumber, string message, string file, string line)

Error handling

  • Visibility: public

Arguments

  • errorNumber int
  • message string
  • file string
  • line string

sanitizePath

string icms_core_Logger::sanitizePath(string path)

Sanitize path / url to file in erorr report

  • Visibility: protected

Arguments

  • path string - <p>path to sanitize</p>

render

string icms_core_Logger::render(string output)

Output buffering callback inserting logger dump in page output

  • Visibility: public

Arguments

  • output string

dump

string icms_core_Logger::dump(string mode)

Prints the logger output data

  • Visibility: public

Arguments

  • mode string

dumpTime

float icms_core_Logger::dumpTime(string name)

Gets the execution time of specific timer

  • Visibility: public

Arguments

  • name string - <p>name of the counter</p>
Clone this wiki locally