https://github.com/themeplate/logger
Opinionated logging structure
https://github.com/themeplate/logger
logger logging wordpress
Last synced: about 2 months ago
JSON representation
Opinionated logging structure
- Host: GitHub
- URL: https://github.com/themeplate/logger
- Owner: ThemePlate
- License: gpl-3.0
- Created: 2022-04-15T02:39:11.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-28T10:38:22.000Z (over 2 years ago)
- Last Synced: 2025-02-28T01:08:40.410Z (over 1 year ago)
- Topics: logger, logging, wordpress
- Language: PHP
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ThemePlate Logger
## Usage
```php
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`