Cartflows_Log_Handler_File
Handles log entries by writing to a file.
Source
File: classes/logger/class-cartflows-log-handler-file.php
Methods
- __construct — Constructor for the logger.
- __destruct — Destructor.
- add — Add a log entry to chosen file.
- cache_log — Cache log to write later.
- clear — Clear entries from chosen file.
- close — Close a handle.
- delete_logs_before_timestamp — Delete all logs older than a defined timestamp.
- format_entry — Builds a log entry text from timestamp, level and message.
- get_log_file_name — Get a log file name.
- get_log_file_path — Get a log file path.
- get_log_files — Get all log files in the log directory.
- handle — Handle a log entry.
- increment_log_infix — Increment a log file suffix.
- is_open — Check if a handle is open.
- log_rotate — Rotate log files.
- open — Open log file for writing.
- remove — Remove/delete the chosen file.
- should_rotate — Check if log file should be rotated.
- write_cached_logs — Write cached logs.