Functionality for tracking, logging, and sending log messages to chrome for debugging.

1.0.9 2025-02-04 12:16 UTC

This package is auto-updated.

Last update: 2025-03-04 12:33:19 UTC


README

Canary is a PHP Library for creating and managing application logs. Originally paired with a browser extension for live logging, the tool now provides a standardized interface for creating managing and saving log messages as files as well as displaying a front-end component for on-page debugging.

Installation

To install simply use the composer command:

php composer.phar require thetempusproject/canary

Usage

Typical usage would be through including the package via composer.


require_once VENDOR_DIRECTORY . 'autoload.php';

use TheTempusProject\Canary\Bin\Canary as Debug;

Debug::info( 'Function called' );
Debug::warn( 'This is a warning message' );

If you would like to use hermes autoloading, simply inclode the constants file and the autoload file inside /bin/.


use TheTempusProject\Canary\Bin\Canary as Debug;

// Canary Constants
if ( ! defined( 'CANARY_CONSTANTS_LOADED' ) ) {
    if ( defined( 'CANARY_CONFIG_DIRECTORY' ) ) {
        require_once CANARY_CONFIG_DIRECTORY . 'constants.php';
    }
}

// Canary Autoloader (Autoloader)
if ( ! defined( 'CANARY_AUTOLOADED' ) ) {
    if ( defined( 'CANARY_ROOT_DIRECTORY' ) ) {
        require_once CANARY_ROOT_DIRECTORY . 'bin' . DIRECTORY_SEPARATOR . 'autoload.php';
    }
}

Debug::info( 'Function called' );
Debug::warn( 'This is a warning message' );

Issues / Bugs / Contact

If anyone actually uses this library and runs into any issues, feel free to contact me and I'll look into it.

Joey Kimsey - Lead Developer

JoeyKimsey.com