-
Notifications
You must be signed in to change notification settings - Fork 17
Change the logging
By default, the logging system writes log information to the PHP error log. However the logging target can be changed so you are able to write error information to a suitable target. For example, for debugging is can be useful to write log information to the console instead of or in addition to the error log. The log class include the debugLog function to do this.
Looking at this function is useful because it illustrates how change the logging targets. The XBRL_log class is a wrapper for the PEAR logging class which includes support for many logging targets.
$logConsole = Log::singleton( 'console', '', 'console',
array(
'lineFormat' => '%{timestamp} [%{priority}] %{message}',
'timeFormat' => '%Y-%m-%d %H:%M:%S',
)
);
$logError = Log::singleton( 'error_log', PEAR_LOG_TYPE_SYSTEM, 'error_log',
array(
'lineFormat' => '[%{priority}] %{message}',
)
);
$logComposite = Log::singleton( 'composite' );
$logComposite->addChild( $logConsole );
$logComposite->addChild( $logError );
$this->setLog( $logComposite );
Copyright © 2021 and later years Lyquidity Solutions Limited
- About us
- Purpose
- XBRL support
- Road Map
- Why PHP?
- Contributing
- License
- Reference links
- Case Study
- Digital Financial Reporting
- Digital Financial Reporting examples
Overview
Class and function reference
Compiled taxonomy structure
Common arrays
Compiling
Compiling
Processing linkbases
Additional taxonomy processing
Extension taxonomies
Compiled taxonomy folder
How do I...?
Navigate a node tree
Find a node in a tree
Find elements in a taxonomy
Load an instance document
Find elements in an instance
Create a simple report
Create a comparison report
Example custom report
Work with dimensions
Sign and Verify
Validate
Change the logging
Capture validation information