OpenTelemetry PHP

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

Properties

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
psalm-suppress

MoreSpecificImplementedParamType

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
string

getLogLevels()

private static getLogLevels() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results