Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
PUM_Utils_Logging::write_to_log( string $message = '' )
Write the log message
Description Description
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Parameters Parameters
- $message
-
(Optional)
Default value: ''
Source Source
File: classes/Utils/Logging.php
protected function write_to_log( $message = '' ) { // Disable logging by adding define( 'PUM_DISABLE_LOGGING', true ); if ( defined( 'PUM_DISABLE_LOGGING' ) && PUM_DISABLE_LOGGING ) { return; } $file_contents = $this->get_file(); $length = strlen( "\r\n" ); // If it doesn't end with a new line, add one. if ( substr( $file_contents, - $length ) !== "\r\n" ) { $file_contents .= "\r\n"; } $file_contents .= $message; $this->content = $file_contents; $this->save_logs(); }
Expand full source code Collapse full source code View on Trac