abstract class \mpf\loggers\Logger

abstract class \mpf\loggers\Logger

@author Mirel Nicu Mitache mirel.mitache@gmail.com @package MPF Framework @link http://www.mpfframework.com @category core package @version 1.0 @since MPF Framework Version 1.0 @copyright Copyright © 2011 Mirel Mitache @license http://www.mpfframework.com/licence

Attributes
private static array $instance = {"mpf\\loggers\\InlineCliLogger":{"levelsToColors":{"emergency":"1;37","alert":"1;31","critical":"1;31","error":"0;31","warning":"0;35","notice":"1;34","info":"1;32","debug":"1;37"},"levelsToBackground":{"emergency":"41","critical":"47","alert":null,"error":null,"warning":null,"notice":null,"info":null,"debug":null},"detailsColor":"0;37","timeColor":"1;30","visibleLevels":["emergency","critical","alert","error","warning","notice","info","debug"],"detaliedLevels":["emergency","critical","alert","error","warning","notice"],"ignoredClasses":["mpf\\datasources\\sql\\PDOConnection"]},"mpf\\loggers\\EmailLogger":{"mailerClass":"mpf\\helpers\\MailHelper","emailAddress":null,"emailPrefix":null,"emailTitle":"Application Log","maxEmailsPerRun":1,"dieWhenMaxEmailsIsReached":true,"visibleLevels":["emergency","critical","alert","error","warning","notice"],"detaliedLevels":["emergency","critical","alert","error","warning","notice"],"ignoredClasses":[]}}

-no description found-

public array $visibleLevels = ["emergency","critical","alert","error","warning","notice","info","debug"]

-no description found-

public array $detaliedLevels = ["emergency","critical","alert","error","warning","notice"]

-no description found-

public array $ignoredClasses = []

List of ignored classes. This only works for DEBUG messages.

Methods

protected mixed init (mixed $config)

  • $config

    -no description found-

-no description found-

public static \mpf\loggers\Logger get (string[] $config = [])

  • $config

    -no description found-

Get active Logger instance;

public abstract mixed getLogs ()

-no description found-

public null emergency (string $message, array $context = [])

  • $message

    -no description found-

  • $context

    -no description found-

System is unusable.

public null alert (string $message, array $context = [])

  • $message

    -no description found-

  • $context

    -no description found-

Action must be taken immediately.

Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.

public null critical (string $message, array $context = [])

  • $message

    -no description found-

  • $context

    -no description found-

Critical conditions.

Example: Application component unavailable, unexpected exception.

public null error (string $message, array $context = [])

  • $message

    -no description found-

  • $context

    -no description found-

Runtime errors that do not require immediate action but should typically be logged and monitored.

public null warning (string $message, array $context = [])

  • $message

    -no description found-

  • $context

    -no description found-

Exceptional occurrences that are not errors.

Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.

public null notice (string $message, array $context = [])

  • $message

    -no description found-

  • $context

    -no description found-

Normal but significant events.

public null info (string $message, array $context = [])

  • $message

    -no description found-

  • $context

    -no description found-

Interesting events.

Example: User logs in, SQL logs.

public null debug (string $message, array $context = [])

  • $message

    -no description found-

  • $context

    -no description found-

Detailed debug information.

public abstract null log (mixed $level, string $message, array $context = [])

  • $level

    -no description found-

  • $message

    -no description found-

  • $context

    -no description found-

Logs with an arbitrary level.