xmarkclx/silverstripe-easylogger

There is no license information available for the latest version (1.1.1) of this package.

Module used to easily log stuff.

Installs: 20

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 0

Type:silverstripe-module

1.1.1 2016-04-12 13:33 UTC

This package is not auto-updated.

Last update: 2024-05-21 01:50:08 UTC


README

Module used to easily log stuff easily for whatever purpose you can imagine.

This isn't meant to be Silverstripe specific. But was made while working on a SS project.

There is a default log file called 'notification.log' that gets created when you use the quick log functions, i.e. EasyLogger::qLog(). The reason for adding multiple log files is that you can segregate stuff you want to log easily.

sales.log
foodEaten.log
etc.

The reason this was made is to make it easy for us to see what is going on in the code asap, so we can just call EasyLogger::qLog('message') or EasyLogger::quickLogCaller($a) to see a backtrace.

Configuration

Zero Configuration!

Default log file is (base_url)/notification.log.

Use custom logger feature to customize log file location.

##How to use## ###Log message### EasyLogger::qLog('message');

###Log variable### EasyLogger::qLog($var);

Log with call trace###

EasyLogger::quickLogCaller($stuff);

###Custom logger### $logger = new EasyLogger('dir/filename');

$loggger->log('message');