Skip to content

FileLoggerAware

  • Full name: \Codefy\Framework\Factory\Traits\FileLoggerAware

Methods

emergency

System is unusable.

public static emergency(string|\Stringable $message, array $context = []): void
  • This method is static.

Parameters:

Parameter Type Description
$message string|\Stringable
$context array

Throws:


alert

Action must be taken immediately.

public static alert(string|\Stringable $message, array $context = []): void

Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.

  • This method is static.

Parameters:

Parameter Type Description
$message string|\Stringable
$context array

Throws:


critical

Critical conditions.

public static critical(string|\Stringable $message, array $context = []): void

Example: Application component unavailable, unexpected exception.

  • This method is static.

Parameters:

Parameter Type Description
$message string|\Stringable
$context array

Throws:


error

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

public static error(string|\Stringable $message, array $context = []): void
  • This method is static.

Parameters:

Parameter Type Description
$message string|\Stringable
$context array

Throws:


warning

Exceptional occurrences that are not errors.

public static warning(string|\Stringable $message, array $context = []): void

Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.

  • This method is static.

Parameters:

Parameter Type Description
$message string|\Stringable
$context array

Throws:


notice

Normal but significant events.

public static notice(string|\Stringable $message, array $context = []): void
  • This method is static.

Parameters:

Parameter Type Description
$message string|\Stringable
$context array

Throws:


info

Interesting events.

public static info(string|\Stringable $message, array $context = []): void

Example: User logs in, SQL logs.

  • This method is static.

Parameters:

Parameter Type Description
$message string|\Stringable
$context array

Throws:


debug

Detailed debug information.

public static debug(string|\Stringable $message, array $context = []): void
  • This method is static.

Parameters:

Parameter Type Description
$message string|\Stringable
$context array

Throws:



Automatically generated on 2025-10-13