ConnectionLogger
extends LoggerAdapter
in package
This is the SDK Connection class.
Table of Contents
CONNECTION_ERROR | = 'F020-C000' | |
---|---|---|
CONNECTION_INFO | = 'F010-C000' | |
PARAMS | = ['error'] | |
REQUIRED_PARAMS | = ['code', 'method', 'path', 'time_taken', 'api_url'] | |
alert() | Adds a log record at the ALERT level. | : bool |
critical() | Adds a log record at the CRITICAL level. | : bool |
debug() | Adds a log record at the DEBUG level. | : bool |
emergency() | Adds a log record at the EMERGENCY level. | : bool |
error() | Adds a log record at the ERROR level. | : bool |
getInstance() | Returns the Requested logger instance. | : LoggerAdapter |
info() | Adds a log record at the INFO level. | : bool |
log() | Adds a log record at an arbitrary level. | : bool |
notice() | Adds a log record at the NOTICE level. | : bool |
reset() | Ends a log cycle and resets all handlers and processors to their initial state. | : mixed |
warning() | Adds a log record at the WARNING level. | : bool |
getLogData() | : array<string|int, mixed> | |
getLoggerName() | : string | |
getLogName() | : string | |
getLogPartition() | : string | |
getMaxFilesize() | Returns the max size of the log file in bytes | : int |
Constants
CONNECTION_ERROR
public
mixed
CONNECTION_ERROR
= 'F020-C000'
CONNECTION_INFO
public
mixed
CONNECTION_INFO
= 'F010-C000'
PARAMS
protected
mixed
PARAMS
= ['error']
REQUIRED_PARAMS
protected
mixed
REQUIRED_PARAMS
= ['code', 'method', 'path', 'time_taken', 'api_url']
Methods
alert()
Adds a log record at the ALERT level.
public
alert(string $message[, array<string|int, mixed> $context = [] ]) : bool
Parameters
- $message : string
-
The log message
- $context : array<string|int, mixed> = []
-
The log context
Return values
bool —Whether the record has been processed
critical()
Adds a log record at the CRITICAL level.
public
critical(string $message[, array<string|int, mixed> $context = [] ]) : bool
Parameters
- $message : string
-
The log message
- $context : array<string|int, mixed> = []
-
The log context
Return values
bool —Whether the record has been processed
debug()
Adds a log record at the DEBUG level.
public
debug(string $message[, array<string|int, mixed> $context = [] ]) : bool
Parameters
- $message : string
-
The log message
- $context : array<string|int, mixed> = []
-
The log context
Return values
bool —Whether the record has been processed
emergency()
Adds a log record at the EMERGENCY level.
public
emergency(string $message[, array<string|int, mixed> $context = [] ]) : bool
Parameters
- $message : string
-
The log message
- $context : array<string|int, mixed> = []
-
The log context
Return values
bool —Whether the record has been processed
error()
Adds a log record at the ERROR level.
public
error(string $message[, array<string|int, mixed> $context = [] ]) : bool
Parameters
- $message : string
-
The log message
- $context : array<string|int, mixed> = []
-
The log context
Return values
bool —Whether the record has been processed
getInstance()
Returns the Requested logger instance.
public
static getInstance() : LoggerAdapter
If is not setted, this method will set it.
Return values
LoggerAdapter —info()
Adds a log record at the INFO level.
public
info(string $message[, array<string|int, mixed> $context = [] ]) : bool
Parameters
- $message : string
-
The log message
- $context : array<string|int, mixed> = []
-
The log context
Return values
bool —Whether the record has been processed
log()
Adds a log record at an arbitrary level.
public
log(mixed $level, string $message[, array<string|int, mixed> $context = [] ]) : bool
Parameters
- $level : mixed
-
The log level
- $message : string
-
The log message
- $context : array<string|int, mixed> = []
-
The log context
Tags
Return values
bool —Whether the record has been processed
notice()
Adds a log record at the NOTICE level.
public
notice(string $message[, array<string|int, mixed> $context = [] ]) : bool
Parameters
- $message : string
-
The log message
- $context : array<string|int, mixed> = []
-
The log context
Return values
bool —Whether the record has been processed
reset()
Ends a log cycle and resets all handlers and processors to their initial state.
public
reset() : mixed
Resetting a Logger means flushing/cleaning all buffers and resetting the internal state.
Return values
mixed —warning()
Adds a log record at the WARNING level.
public
warning(string $message[, array<string|int, mixed> $context = [] ]) : bool
Parameters
- $message : string
-
The log message
- $context : array<string|int, mixed> = []
-
The log context
Return values
bool —Whether the record has been processed
getLogData()
protected
getLogData(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
Return values
array<string|int, mixed> —getLoggerName()
protected
getLoggerName() : string
Return values
string —getLogName()
protected
getLogName() : string
Return values
string —getLogPartition()
protected
getLogPartition() : string
Return values
string —getMaxFilesize()
Returns the max size of the log file in bytes
protected
getMaxFilesize() : int