/pagekit-logger

Allows for easy logging in the Pagekit CMS

Primary LanguageJavaScriptMIT LicenseMIT

pagekit-logger

Allows for easy logging in the Pagekit CMS

pagekit-logger-preview

Install:

php pagekit install nativerank/pagekit-logger   // Activate after installing in the System

Basic Usage:

// Log a simple String
$logger = App::getPagekitLogger();
$logger->log('Hello log!');

// Log an exception
$logger->log($e);

Options:

// Name
$logger = new PagekitLogger(['name' => 'MyLogger']);                // Change Logger name

// Log Level
$logger->log('Hello log!', PagekitLogger::INFO);                    // Log level INFO

// Exceptions:
$logger->log($e, PagekitLogger::CRITICAL);                          // Custom Error Level

Defaults:

Name:       PagekitLogger

Log Level:  ERROR

Log Levels:

  • DEBUG
  • INFO
  • NOTICE
  • WARNING
  • ERROR
  • CRITICAL
  • ALERT
  • EMERGENCY

License:

MIT