DebugTrait¶
-
trait
atk4\core\
DebugTrait
¶ Source: vendor/atk4/core/src/DebugTrait.php#7
Properties¶
-
public static property
atk4\core\DebugTrait::$
_debugTrait
¶ - Check this property to see if trait is present in the object.
Source: vendor/atk4/core/src/DebugTrait.php#14 Type: bool
-
public static property
atk4\core\DebugTrait::$
debug
¶ Source: vendor/atk4/core/src/DebugTrait.php#17 Type: bool Is debug enabled?
-
protected static property
atk4\core\DebugTrait::$
_prev_bt
¶ Source: vendor/atk4/core/src/DebugTrait.php#20 Type: array Helps debugTraceChange.
Methods¶
-
protected
atk4\core\DebugTrait::
_echo_stderr
($message)¶ - Outputs message to STDERR.
Source: Parameters: - $message (string)
-
public
atk4\core\DebugTrait::
debug
($message=true, $context=[])¶ - Send some info to debug stream.
Source: Parameters: - $message (bool | string)
- $context (array)
Returns: $this
-
public
atk4\core\DebugTrait::
log
($level, $message, $context=[])¶ - Output log message.
Source: Parameters: - $level (string)
- $message (string)
- $context (array)
Returns: $this
-
public
atk4\core\DebugTrait::
userMessage
($message, $context=[])¶ - Output message that needs to be acknowledged by application user. Make surethat $context does not contain any sensitive information.
Source: Parameters: - $message (string)
- $context (array)
Returns: $this
-
public
atk4\core\DebugTrait::
debugTraceChange
($trace=default)¶ - Method designed to intercept one of the hardest-to-debug situations within Agile Toolkit.Suppose you define a hook and the hook needs to be called only once, but somehow it isbeing called multiple times. You want to know where and how those calls come through.Place debugTraceChange inside your hook and give unique $trace identifier. If the methodis invoked through different call paths, this debug info will be logged.Do not leave this method in production code !!!
Source: Parameters: - $trace (string)
-
public
atk4\core\DebugTrait::
emergency
($message, $context=[])¶ - System is unusable.
Source: Parameters: - $message (string)
- $context (array)
Returns: void
-
public
atk4\core\DebugTrait::
alert
($message, $context=[])¶ - Action must be taken immediately.Example: Entire website down, database unavailable, etc. This shouldtrigger the SMS alerts and wake you up.
Source: Parameters: - $message (string)
- $context (array)
Returns: void
-
public
atk4\core\DebugTrait::
critical
($message, $context=[])¶ - Critical conditions.Example: Application component unavailable, unexpected exception.
Source: Parameters: - $message (string)
- $context (array)
Returns: void
-
public
atk4\core\DebugTrait::
error
($message, $context=[])¶ - Runtime errors that do not require immediate action but should typicallybe logged and monitored.
Source: Parameters: - $message (string)
- $context (array)
Returns: void
-
public
atk4\core\DebugTrait::
warning
($message, $context=[])¶ - Exceptional occurrences that are not errors.Example: Use of deprecated APIs, poor use of an API, undesirable thingsthat are not necessarily wrong.
Source: Parameters: - $message (string)
- $context (array)
Returns: void
-
public
atk4\core\DebugTrait::
notice
($message, $context=[])¶ - Normal but significant events.
Source: Parameters: - $message (string)
- $context (array)
Returns: void
-
public
atk4\core\DebugTrait::
info
($message, $context=[])¶ - Interesting events.Example: User logs in, SQL logs.
Source: Parameters: - $message (string)
- $context (array)
Returns: void