themeplate/logger

Opinionated logging structure

v2.1.0 2024-02-27 13:59 UTC

This package is auto-updated.

Last update: 2024-10-28 12:00:56 UTC


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