SimplePsrFileLogger
in package
implements
LoggerInterface
uses
LoggerTrait
Table of Contents
Interfaces
- LoggerInterface
Constants
- DEFAULT_LOGGER_NAME = 'otel'
Properties
- $filename : string
- $loggerName : string
- $logLevels : array<string|int, mixed>|null
Methods
- __construct() : mixed
- log() : void
- formatLog() : string
- getLogLevels() : array<string|int, mixed>
Constants
DEFAULT_LOGGER_NAME
private
mixed
DEFAULT_LOGGER_NAME
= 'otel'
Properties
$filename read-only
private
string
$filename
$loggerName read-only
private
string
$loggerName
= self::DEFAULT_LOGGER_NAME
$logLevels
private
static array<string|int, mixed>|null
$logLevels
= null
Methods
__construct()
public
__construct(string $filename[, string $loggerName = self::DEFAULT_LOGGER_NAME ]) : mixed
Parameters
- $filename : string
- $loggerName : string = self::DEFAULT_LOGGER_NAME
log()
public
log(mixed $level, mixed $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $level : mixed
- $message : mixed
- $context : array<string|int, mixed> = []
Tags
formatLog()
private
formatLog(string $level, string $message[, array<string|int, mixed> $context = [] ]) : string
Parameters
- $level : string
- $message : string
- $context : array<string|int, mixed> = []
Return values
stringgetLogLevels()
private
static getLogLevels() : array<string|int, mixed>