LogTarget ​
- Type
- Class
- Namespace
- craft\debug
- Inherits
- craft\debug\LogTarget » yii\debug\LogTarget » yii\log\Target » yii\base\Component » yii\base\BaseObject
- Implements
- yii\base\Configurable
- Since
- 4.0.0
The debug LogTarget is used to store logs for later use in the debugger tool
Public Properties ​
Property | Description |
---|---|
behaviors | yii\base\Behavior – List of behaviors attached to this component. |
categories | array – List of message categories that this target is interested in. |
enabled | boolean – Indicates whether this log target is enabled. |
except | array – List of message categories that this target is NOT interested in. |
exportInterval | integer – How many messages should be accumulated before they are exported. |
levels | integer – The message levels that this target is interested in. |
logVars | array – List of the PHP predefined variables that should be logged in a message. |
maskVars | array – List of the PHP predefined variables that should NOT be logged "as is" and should always be replaced with a mask *** before logging, when exist. |
messages | array – The messages that are retrieved from the logger so far by this log target. |
microtime | boolean – Whether to log time with microseconds. |
module | craft\debug\Module |
prefix | callable, null – A PHP callable that returns a string to be prefixed to every exported message. |
tag | string |
module
​
- Type
- craft\debug\Module
- Default value
null
Public Methods ​
Method | Description |
---|---|
__call() | Calls the named method which is not a class method. |
__clone() | This method is called after the object is created by cloning an existing one. |
__construct() | |
__get() | Returns the value of a component property. |
__isset() | Checks if a property is set, i.e. defined and not null. |
__set() | Sets the value of a component property. |
__unset() | Sets a component property to be null. |
attachBehavior() | Attaches a behavior to this component. |
attachBehaviors() | Attaches a list of behaviors to the component. |
behaviors() | Returns a list of behaviors that this component should behave as. |
canGetProperty() | Returns a value indicating whether a property can be read. |
canSetProperty() | Returns a value indicating whether a property can be set. |
className() | Returns the fully qualified name of this class. |
collect() | Processes the given log messages. |
detachBehavior() | Detaches a behavior from the component. |
detachBehaviors() | Detaches all behaviors from the component. |
ensureBehaviors() | Makes sure that the behaviors declared in behaviors() are attached to this component. |
export() | Exports log messages to a specific destination. |
filterMessages() | Filters the given messages according to their categories and levels. |
formatMessage() | Formats a log message for display as a string. |
getBehavior() | Returns the named behavior object. |
getBehaviors() | Returns all behaviors attached to this component. |
getEnabled() | Check whether the log target is enabled. |
getLevels() | |
getMessagePrefix() | Returns a string to be prefixed to the given message. |
hasEventHandlers() | Returns a value indicating whether there is any handler attached to the named event. |
hasMethod() | Returns a value indicating whether a method is defined. |
hasProperty() | Returns a value indicating whether a property is defined for this component. |
init() | Initializes the object. |
loadManifest() | |
loadTagToPanels() | |
off() | Detaches an existing event handler from this component. |
on() | Attaches an event handler to an event. |
setEnabled() | Sets a value indicating whether this log target is enabled. |
setLevels() | Sets the message levels that this target is interested in. |
trigger() | Triggers an event. |
export()
​
Exports log messages to a specific destination.
Child classes must implement this method.
Throws ​
loadManifest()
​
Returns ​
loadTagToPanels()
​
Arguments ​
$tag
Returns ​
Protected Methods ​
Method | Description |
---|---|
collectSummary() | Collects summary data of current request. |
gc() | Removes obsolete data files |
getContextMessage() | Generates the context information to be logged. |
getExcessiveDbCallersCount() | Get the number of excessive Database caller(s). |
getSqlTotalCount() | Returns total sql count executed in current request. If database panel is not configured returns 0. |
getTime() | Returns formatted ('Y-m-d H:i:s') timestamp for message. |
removeStaleDataFiles() | Remove staled data files i.e. files that are not in the current index file (may happen because of corrupted or rotated index file) |
gc()
​
Removes obsolete data files
Arguments ​
$manifest
(array)
removeStaleDataFiles()
​
Remove staled data files i.e. files that are not in the current index file (may happen because of corrupted or rotated index file)
Arguments ​
$manifest
(array)