Menu

## PioniaLogger
in package
implements LoggerInterface Uses Containable

PioniaLogger.php : 22

### Table of Contents

#### Interfaces

LoggerInterface

#### Properties

$context : ContainerInterface|Container|null
  Application container context
$baseLogger : LoggerInterface
$destination : string|null
$formatter : FormatterInterface|null
$handlers : Arrayable|null
$hiddenKeys : array<string|int, mixed>
$name : string
$processors : Arrayable|null
$settings : Arrayable

#### Methods

__construct() : mixed
addHandler() : static
alert() : void
critical() : void
debug() : void
emergency() : void
error() : void
getOrDefault() : mixed
  Get a value from the container or return a default value
getOrFail() : mixed
getSilently() : mixed
hideInLogs() : array<string|int, mixed>
  This method will hide the secure keys in the logs
info() : void
log() : void
notice() : void
resolveDestination() : void
  sets up our logger destination.
set() : void
  Set a value in the container
setLogger() : void
warning() : void
contextHas() : bool
addFormatter() : void
resolveHandlers() : void

### Properties

#### $context

Containable.php : 20

Application container context

`public ContainerInterface|Container|null $context`

#### $baseLogger

PioniaLogger.php : 51
`private LoggerInterface $baseLogger = null`

|Logger | null The base logger we shall rely on. By default it is the Monolog Logger

#### $destination

PioniaLogger.php : 61
`private string|null $destination = null`

The destination to log to

#### $formatter

PioniaLogger.php : 46
`private FormatterInterface|null $formatter`

The formatter to use

#### $handlers

PioniaLogger.php : 36
`private Arrayable|null $handlers`

log handlers to use

#### $hiddenKeys

PioniaLogger.php : 26
`private array<string|int, mixed> $hiddenKeys = ['password', 'pass', 'pin', 'passwd', 'secret_key', 'pwd', 'token', 'credit_card', 'creditcard', 'cc', 'secret', 'cvv', 'cvn']`

#### $name

PioniaLogger.php : 30
`private string $name`

#### $processors

PioniaLogger.php : 41
`private Arrayable|null $processors`

log processors to use

#### $settings

PioniaLogger.php : 56
`private Arrayable $settings`

The settings for the logger, it is the logging section in the database.ini file or settings from the application

### Methods

#### __construct()

PioniaLogger.php : 63
`public __construct(Container $context[, EnvResolver|Arrayable|null $settings = null ]) : mixed`

##### Parameters

$context : Container
$settings : EnvResolver|Arrayable|null = null

#### addHandler()

PioniaLogger.php : 192
`public addHandler(callable $callable) : static`

##### Parameters

$callable : callable

##### Return values

static

#### alert()

PioniaLogger.php : 268
`public alert(Stringable|string $message[, array<string|int, mixed> $context = [] ]) : void`

##### Parameters

$message : Stringable|string
$context : array<string|int, mixed> = []

#### critical()

PioniaLogger.php : 274
`public critical(Stringable|string $message[, array<string|int, mixed> $context = [] ]) : void`

##### Parameters

$message : Stringable|string
$context : array<string|int, mixed> = []

#### debug()

PioniaLogger.php : 304
`public debug(Stringable|string $message[, array<string|int, mixed> $context = [] ]) : void`

##### Parameters

$message : Stringable|string
$context : array<string|int, mixed> = []

#### emergency()

PioniaLogger.php : 262
`public emergency(Stringable|string $message[, array<string|int, mixed> $context = [] ]) : void`

##### Parameters

$message : Stringable|string
$context : array<string|int, mixed> = []

#### error()

PioniaLogger.php : 280
`public error(Stringable|string $message[, array<string|int, mixed> $context = [] ]) : void`

##### Parameters

$message : Stringable|string
$context : array<string|int, mixed> = []

#### getOrDefault()

Containable.php : 51

Get a value from the container or return a default value

`public getOrDefault(string $key, mixed $default) : mixed`

##### Parameters

$key : string
$default : mixed

#### getOrFail()

Containable.php : 60
`public getOrFail(mixed $key) : mixed`

##### Parameters

$key : mixed

##### Tags

throws
  ContainerExceptionInterface
throws
  NotFoundExceptionInterface

#### getSilently()

Containable.php : 36
`public getSilently(mixed $key) : mixed`

##### Parameters

$key : mixed

#### hideInLogs()

PioniaLogger.php : 243

This method will hide the secure keys in the logs

`public hideInLogs([array<string|int, mixed> $data = [] ]) : array<string|int, mixed>`

##### Parameters

$data : array<string|int, mixed> = []

  The data whose secure keys are to be hidden

##### Return values

array<string|int, mixed> —

The data with the hidden keys hidden

#### info()

PioniaLogger.php : 298
`public info(Stringable|string $message[, array<string|int, mixed> $context = [] ]) : void`

##### Parameters

$message : Stringable|string
$context : array<string|int, mixed> = []

#### log()

PioniaLogger.php : 310
`public log(mixed $level, Stringable|string $message[, array<string|int, mixed> $context = [] ]) : void`

##### Parameters

$level : mixed
$message : Stringable|string
$context : array<string|int, mixed> = []

#### notice()

PioniaLogger.php : 292
`public notice(Stringable|string $message[, array<string|int, mixed> $context = [] ]) : void`

##### Parameters

$message : Stringable|string
$context : array<string|int, mixed> = []

#### resolveDestination()

PioniaLogger.php : 132

sets up our logger destination.

`public resolveDestination([string|null $destination = null ]) : void`

You can also define the LOG_DESTINATION in the logging section of the database.ini file. This must be relative to the logs folder. If you want to log to a file, you can define the LOGS_DESTINATION_FILE in the context. This will be used as the destination.

##### Parameters

$destination : string|null = null

#### set()

Containable.php : 31

Set a value in the container

`public set(string $name, mixed $value) : void`

##### Parameters

$name : string
$value : mixed

#### setLogger()

PioniaLogger.php : 172
`public setLogger([LoggerInterface|null $logger = null ]) : void`

##### Parameters

$logger : LoggerInterface|null = null

#### warning()

PioniaLogger.php : 286
`public warning(Stringable|string $message[, array<string|int, mixed> $context = [] ]) : void`

##### Parameters

$message : Stringable|string
$context : array<string|int, mixed> = []

#### contextHas()

Containable.php : 23
`protected contextHas(string $key) : bool`

##### Parameters

$key : string

##### Return values

bool

#### addFormatter()

PioniaLogger.php : 201
`private addFormatter([FormatterInterface|null $formatter = null ]) : void`

##### Parameters

$formatter : FormatterInterface|null = null

#### resolveHandlers()

PioniaLogger.php : 177
`private resolveHandlers() : void`

## Search results