themeplate / logger
Opinionated logging structure
v2.1.0
2024-02-27 13:59 UTC
Requires
- php: ^8.2
- monolog/monolog: ^3.5
- psr/log: ^3.0
Requires (Dev)
- themeplate/tester: ^2.2
README
Usage
use ThemePlate\Logger; $logger = new Logger( 'mylogs', 'path/to/save' ); $logger->channel( 'api' )->info( 'READY!' ); $logger->channel( 'app' )->info( 'INITIALIZED!' );
path/to/save/mylogs/[year]/[month]/[day]/[channel].log
new Logger( $folder_name, $base_path )
- $folder_name (string)(Optional) Default
logs
- $base_path (string)(Optional) Default
WP_CONTENT_DIR