Simple feature-supporting (categories) Logging for PHP.

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

v1.0.0 2013-04-10 12:45 UTC




Download the src/ directory and place it into your working directory. then include the file naLogger.php

require 'src/naLogger.php';

With Composer

Create a composer.json with this content:

    "require": {
        "reflic/na-logger": "v1.0.0"

If you already have a composer.json add this to the require section: "reflic/na-logger": "v1.0.0

Then to autoload the libary add this to your main PHP file. (In most frameworks like Laravel or Symfony this file is already loaded.)

require 'vendor/autoload.php';

// Create the log object.
$logger = new naLogger('etc/log.txt', naLogger::DEBUG);

// Log some messages.
$logger->logEmerg('Database crashed.', 'Database');
$logger->logAlert('Loadtime over 5s!', 'Server');
$logger->logNotice('User Login failed.', 'User');
$logger->logInfo('Cronjob "test" started.', 'Cronjob');
$logger->logDebug('User-Hash: 838hshf82bd01()', 'Usermodule');