Nextcloud PHP API (master)

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

deprecated
20.0.0

use the PSR-3 logger \Psr\Log\LoggerInterface

Table of Contents

Constants

DEBUG  = 0
ERROR  = 3
FATAL  = 4
INFO  = 1
WARN  = 2

Methods

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 = 0
Tags
since
14.0.0
deprecated
20.0.0

ERROR

public mixed ERROR = 3
Tags
since
14.0.0
deprecated
20.0.0

FATAL

public mixed FATAL = 4
Tags
since
14.0.0
deprecated
20.0.0

INFO

public mixed INFO = 1
Tags
since
14.0.0
deprecated
20.0.0

WARN

public mixed WARN = 2
Tags
since
14.0.0
deprecated
20.0.0

Methods

alert()

Action must be taken immediately.

public alert(string $message[, array<string|int, mixed> $context = [] ]) : null
Parameters
$message : string
$context : array<string|int, mixed> = []
Tags
since
7.0.0
deprecated
20.0.0

use \Psr\Log\LoggerInterface::alert

Return values
null

critical()

Critical conditions.

public critical(string $message[, array<string|int, mixed> $context = [] ]) : null
Parameters
$message : string
$context : array<string|int, mixed> = []
Tags
since
7.0.0
deprecated
20.0.0

use \Psr\Log\LoggerInterface::critical

Return values
null

debug()

Detailed debug information.

public debug(string $message[, array<string|int, mixed> $context = [] ]) : null
Parameters
$message : string
$context : array<string|int, mixed> = []
Tags
since
7.0.0
deprecated
20.0.0

use \Psr\Log\LoggerInterface::debug

Return values
null

emergency()

System is unusable.

public emergency(string $message[, array<string|int, mixed> $context = [] ]) : null
Parameters
$message : string
$context : array<string|int, mixed> = []
Tags
since
7.0.0
deprecated
20.0.0

use \Psr\Log\LoggerInterface::emergency

Return values
null

error()

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

public error(string $message[, array<string|int, mixed> $context = [] ]) : null
Parameters
$message : string
$context : array<string|int, mixed> = []
Tags
since
7.0.0
deprecated
20.0.0

use \Psr\Log\LoggerInterface::error

Return values
null

info()

Interesting events.

public info(string $message[, array<string|int, mixed> $context = [] ]) : null
Parameters
$message : string
$context : array<string|int, mixed> = []
Tags
since
7.0.0
deprecated
20.0.0

use \Psr\Log\LoggerInterface::info

Return values
null

log()

Logs with an arbitrary level.

public log(int $level, string $message[, array<string|int, mixed> $context = [] ]) : mixed
Parameters
$level : int
$message : string
$context : array<string|int, mixed> = []
Tags
since
7.0.0
deprecated
20.0.0

use \Psr\Log\LoggerInterface::log

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<string|int, mixed> $context = [] ]) : void
$logger->logException($ex, [ 'message' => 'Exception during background job execution' ]);
Parameters
$exception : Exception|Throwable
$context : array<string|int, mixed> = []
Tags
since
8.2.0
deprecated
20.0.0

use the exception entry in the context of any method in \Psr\Log\LoggerInterface

notice()

Normal but significant events.

public notice(string $message[, array<string|int, mixed> $context = [] ]) : null
Parameters
$message : string
$context : array<string|int, mixed> = []
Tags
since
7.0.0
deprecated
20.0.0

use \Psr\Log\LoggerInterface::notice

Return values
null

warning()

Exceptional occurrences that are not errors.

public warning(string $message[, array<string|int, mixed> $context = [] ]) : null
Parameters
$message : string
$context : array<string|int, mixed> = []
Tags
since
7.0.0
deprecated
20.0.0

use \Psr\Log\LoggerInterface::warning

Return values
null

        
On this page

Search results