ILogger

interface OCP\ILogger
Interface ILogger
Implemented by:OC\Log OC\AppFramework\Logger
Source:lib/public/ILogger.php#38

Constants

DEBUG = 0
Source:lib/public/ILogger.php#42
Since:14.0.0
INFO = 1
Source:lib/public/ILogger.php#46
Since:14.0.0
WARN = 2
Source:lib/public/ILogger.php#50
Since:14.0.0
ERROR = 3
Source:lib/public/ILogger.php#54
Since:14.0.0
FATAL = 4
Source:lib/public/ILogger.php#58
Since:14.0.0

Methods

public OCP\ILogger::emergency($message, $context=[])
System is unusable.
Source:

lib/public/ILogger.php#68

Parameters:
  • $message (string)
  • $context (array)
Returns:

null

Since:

7.0.0

public OCP\ILogger::alert($message, $context=[])
Action must be taken immediately.
Source:

lib/public/ILogger.php#78

Parameters:
  • $message (string)
  • $context (array)
Returns:

null

Since:

7.0.0

public OCP\ILogger::critical($message, $context=[])
Critical conditions.
Source:

lib/public/ILogger.php#88

Parameters:
  • $message (string)
  • $context (array)
Returns:

null

Since:

7.0.0

public OCP\ILogger::error($message, $context=[])
Runtime errors that do not require immediate action but should typically
be logged and monitored.
Source:

lib/public/ILogger.php#99

Parameters:
  • $message (string)
  • $context (array)
Returns:

null

Since:

7.0.0

public OCP\ILogger::warning($message, $context=[])
Exceptional occurrences that are not errors.
Source:

lib/public/ILogger.php#109

Parameters:
  • $message (string)
  • $context (array)
Returns:

null

Since:

7.0.0

public OCP\ILogger::notice($message, $context=[])
Normal but significant events.
Source:

lib/public/ILogger.php#119

Parameters:
  • $message (string)
  • $context (array)
Returns:

null

Since:

7.0.0

public OCP\ILogger::info($message, $context=[])
Interesting events.
Source:

lib/public/ILogger.php#129

Parameters:
  • $message (string)
  • $context (array)
Returns:

null

Since:

7.0.0

public OCP\ILogger::debug($message, $context=[])
Detailed debug information.
Source:

lib/public/ILogger.php#139

Parameters:
  • $message (string)
  • $context (array)
Returns:

null

Since:

7.0.0

public OCP\ILogger::log($level, $message, $context=[])
Logs with an arbitrary level.
Source:

lib/public/ILogger.php#150

Parameters:
  • $level (int)
  • $message (string)
  • $context (array)
Returns:

mixed

Since:

7.0.0

public OCP\ILogger::logException($exception, $context=[])
Logs an exception very detailed
An additional message can we written to the log by adding it to the
context.
<code>
$logger->logException($ex, [
‘message’ => ‘Exception during background job execution’
]);
</code>
Source:

lib/public/ILogger.php#168

Parameters:
  • $exception (Exception | \Throwable)
  • $context (array)
Returns:

void

Since:

8.2.0