ILogger¶
-
interface
OCP\ILogger¶ - Interface ILogger
Implemented by: OC\LogOC\AppFramework\LoggerSource: lib/public/ILogger.php#43
Constants¶
-
DEBUG = 0 Source: lib/public/ILogger.php#48 Since: 14.0.0 Deprecated: 20.0.0
-
INFO = 1 Source: lib/public/ILogger.php#53 Since: 14.0.0 Deprecated: 20.0.0
-
WARN = 2 Source: lib/public/ILogger.php#58 Since: 14.0.0 Deprecated: 20.0.0
-
ERROR = 3 Source: lib/public/ILogger.php#63 Since: 14.0.0 Deprecated: 20.0.0
-
FATAL = 4 Source: lib/public/ILogger.php#68 Since: 14.0.0 Deprecated: 20.0.0
Methods¶
-
public
OCP\ILogger::emergency($message, $context=[])¶ - System is unusable.
Source: Parameters: - $message (string)
- $context (array)
Returns: null
Since: 7.0.0
Deprecated: 20.0.0 use \Psr\Log\LoggerInterface::emergency
-
public
OCP\ILogger::alert($message, $context=[])¶ - Action must be taken immediately.
Source: Parameters: - $message (string)
- $context (array)
Returns: null
Since: 7.0.0
Deprecated: 20.0.0 use \Psr\Log\LoggerInterface::alert
-
public
OCP\ILogger::critical($message, $context=[])¶ - Critical conditions.
Source: Parameters: - $message (string)
- $context (array)
Returns: null
Since: 7.0.0
Deprecated: 20.0.0 use \Psr\Log\LoggerInterface::critical
-
public
OCP\ILogger::error($message, $context=[])¶ - Runtime errors that do not require immediate action but should typicallybe logged and monitored.
Source: Parameters: - $message (string)
- $context (array)
Returns: null
Since: 7.0.0
Deprecated: 20.0.0 use \Psr\Log\LoggerInterface::error
-
public
OCP\ILogger::warning($message, $context=[])¶ - Exceptional occurrences that are not errors.
Source: Parameters: - $message (string)
- $context (array)
Returns: null
Since: 7.0.0
Deprecated: 20.0.0 use \Psr\Log\LoggerInterface::warning
-
public
OCP\ILogger::notice($message, $context=[])¶ - Normal but significant events.
Source: Parameters: - $message (string)
- $context (array)
Returns: null
Since: 7.0.0
Deprecated: 20.0.0 use \Psr\Log\LoggerInterface::notice
-
public
OCP\ILogger::info($message, $context=[])¶ - Interesting events.
Source: Parameters: - $message (string)
- $context (array)
Returns: null
Since: 7.0.0
Deprecated: 20.0.0 use \Psr\Log\LoggerInterface::info
-
public
OCP\ILogger::debug($message, $context=[])¶ - Detailed debug information.
Source: Parameters: - $message (string)
- $context (array)
Returns: null
Since: 7.0.0
Deprecated: 20.0.0 use \Psr\Log\LoggerInterface::debug
-
public
OCP\ILogger::log($level, $message, $context=[])¶ - Logs with an arbitrary level.
Source: Parameters: - $level (int)
- $message (string)
- $context (array)
Returns: mixed
Since: 7.0.0
Deprecated: 20.0.0 use \Psr\Log\LoggerInterface::log
-
public
OCP\ILogger::logException($exception, $context=[])¶ - Logs an exception very detailedAn additional message can we written to the log by adding it to thecontext.<code>$logger->logException($ex, [‘message’ => ‘Exception during background job execution’]);</code>
Source: Parameters: - $exception (
Exception|\Throwable) - $context (array)
Returns: void
Since: 8.2.0
Deprecated: 20.0.0 use the `exception` entry in the context of any method in \Psr\Log\LoggerInterface
- $exception (