Overview

Namespaces

  • GAubry
    • ErrorHandler
    • Helpers
    • Logger
    • Shell
  • Himedia
    • Padocc
      • DB
      • Minifier
      • Numbering
      • Properties
      • Task
        • Base
        • Extended
  • None
  • Psr
    • Log

Classes

  • AbstractLogger
  • ColoredIndentedLogger
  • MinimalLogger
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Class AbstractLogger

This is a simple abstract Logger implementation that other Loggers can inherit from.

Copyright (c) 2013 Geoffroy Aubry <geoffroy.aubry@free.fr> Licensed under the GNU Lesser General Public License v3 (LGPL version 3).

Psr\Log\AbstractLogger implements Psr\Log\LoggerInterface
Extended by GAubry\Logger\AbstractLogger

Direct known subclasses

GAubry\Logger\ColoredIndentedLogger, GAubry\Logger\MinimalLogger
Abstract
Namespace: GAubry\Logger
Copyright: 2013 Geoffroy Aubry <geoffroy.aubry@free.fr>
License: http://www.gnu.org/licenses/lgpl.html
See: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md
Located at logger/src/GAubry/Logger/AbstractLogger.php
Methods summary
protected
# __construct( string $sMinMsgLevel = GAubry\Logger\LogLevel::DEBUG )

Constructor.

Constructor.

Parameters

$sMinMsgLevel
string
$iMinMsgLevel threshold required to log message, must be defined in \Psr\Log\LogLevel

Throws

Psr\Log\InvalidArgumentException
if calling this method with a level not defined in \Psr\Log\LogLevel
protected
# checkMsgLevel( string $sMsgLevel )

Check that specified $sMsgLevel is defined into \Psr\Log\LogLevel.

Check that specified $sMsgLevel is defined into \Psr\Log\LogLevel.

Parameters

$sMsgLevel
string
$sMsgLevel

Throws

Psr\Log\InvalidArgumentException
if calling this method with a level not defined in \Psr\Log\LogLevel
protected string
# interpolateContext( string $sMessage, array $aContext )

Interpolates context values into the message placeholders. Taken from PSR-3's example implementation.

Interpolates context values into the message placeholders. Taken from PSR-3's example implementation.

Placeholder names MUST be delimited with a single opening brace { and a single closing brace }. There MUST NOT be any whitespace between the delimiters and the placeholder name. Placeholder names SHOULD be composed only of the characters A-Z, a-z, 0-9, underscore _, and period .. The use of other characters is reserved for future modifications of the placeholders specification.

Placeholders in the form {foo} will be replaced by the context data in key "foo".

Parameters

$sMessage
string
$sMessage message with placeholders
$aContext
array
$aContext context array

Returns

string
message whose placeholders are replaced by context values
Methods inherited from Psr\Log\AbstractLogger
alert(), critical(), debug(), emergency(), error(), info(), notice(), warning()
Methods inherited from Psr\Log\LoggerInterface
log()
Properties summary
protected integer $iMinMsgLevel
#

Int value of threshold required to log message.

Int value of threshold required to log message.

See

GAubry\Logger\AbstractLogger::$aIntLevels
protected static array $aIntLevels array( LogLevel::DEBUG => 0, LogLevel::INFO => 10, LogLevel::NOTICE => 20, LogLevel::WARNING => 30, LogLevel::ERROR => 40, LogLevel::CRITICAL => 50, LogLevel::ALERT => 60, LogLevel::EMERGENCY => 70 )
#

Describes log levels with priority. PSR-3 Log levels are string-based…

Describes log levels with priority. PSR-3 Log levels are string-based…

See

Psr\Log\LogLevel
Platform for Automatized Deployments with pOwerful Concise Configuration API documentation generated by ApiGen 2.8.0