Nextcloud PHP API (stable18)

ILogger

Interface ILogger

Tags
since
7.0.0

This logger interface follows the design guidelines of PSR-3 https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md#3-psrlogloggerinterface

Table of Contents

DEBUG  = 0
ERROR  = 3
FATAL  = 4
INFO  = 1
WARN  = 2
alert()  : null
Action must be taken immediately.
critical()  : null
Critical conditions.
debug()  : null
Detailed debug information.
emergency()  : null
System is unusable.
error()  : null
Runtime errors that do not require immediate action but should typically be logged and monitored.
info()  : null
Interesting events.
log()  : mixed
Logs with an arbitrary level.
logException()  : void
Logs an exception very detailed An additional message can we written to the log by adding it to the context.
notice()  : null
Normal but significant events.
warning()  : null
Exceptional occurrences that are not errors.

Constants

DEBUG

public mixed DEBUG = ""
Tags
since
14.0.0

ERROR

public mixed ERROR = 3
Tags
since
14.0.0

FATAL

public mixed FATAL = 4
Tags
since
14.0.0

INFO

public mixed INFO = 1
Tags
since
14.0.0

WARN

public mixed WARN = 2
Tags
since
14.0.0

Methods

alert()

Action must be taken immediately.

public alert(string $message[, array $context = [] ]) : null
Parameters
$message : string
$context : array = []
Tags
since
7.0.0
Return values
null

critical()

Critical conditions.

public critical(string $message[, array $context = [] ]) : null
Parameters
$message : string
$context : array = []
Tags
since
7.0.0
Return values
null

debug()

Detailed debug information.

public debug(string $message[, array $context = [] ]) : null
Parameters
$message : string
$context : array = []
Tags
since
7.0.0
Return values
null

emergency()

System is unusable.

public emergency(string $message[, array $context = [] ]) : null
Parameters
$message : string
$context : array = []
Tags
since
7.0.0
Return values
null

error()

Runtime errors that do not require immediate action but should typically be logged and monitored.

public error(string $message[, array $context = [] ]) : null
Parameters
$message : string
$context : array = []
Tags
since
7.0.0
Return values
null

info()

Interesting events.

public info(string $message[, array $context = [] ]) : null
Parameters
$message : string
$context : array = []
Tags
since
7.0.0
Return values
null

log()

Logs with an arbitrary level.

public log(int $level, string $message[, array $context = [] ]) : mixed
Parameters
$level : int
$message : string
$context : array = []
Tags
since
7.0.0
Return values
mixed

logException()

Logs an exception very detailed An additional message can we written to the log by adding it to the context.

public logException(Exception|Throwable $exception[, array $context = [] ]) : void

<code> $logger->logException($ex, [ 'message' => 'Exception during background job execution' ]); </code>

Parameters
$exception : Exception|Throwable
$context : array = []
Tags
since
8.2.0

notice()

Normal but significant events.

public notice(string $message[, array $context = [] ]) : null
Parameters
$message : string
$context : array = []
Tags
since
7.0.0
Return values
null

warning()

Exceptional occurrences that are not errors.

public warning(string $message[, array $context = [] ]) : null
Parameters
$message : string
$context : array = []
Tags
since
7.0.0
Return values
null

Search results