WC_Log_Handler_File::add( string $entry, string $handle )
Add a log entry to chosen file.
Description Description
Parameters Parameters
- $entry
-
(Required) Log entry text.
- $handle
-
(Required) Log entry handle.
Return Return
(bool) True if write was successful.
Source Source
File: includes/log-handlers/class-wc-log-handler-file.php
protected function add( $entry, $handle ) { $result = false; if ( $this->should_rotate( $handle ) ) { $this->log_rotate( $handle ); } if ( $this->open( $handle ) && is_resource( $this->handles[ $handle ] ) ) { $result = fwrite( $this->handles[ $handle ], $entry . PHP_EOL ); // @codingStandardsIgnoreLine. } else { $this->cache_log( $entry, $handle ); } return false !== $result; }