atk14 / logger
ATK14 Logger provides logging infrastructure for the ATK14 Framework
Installs: 1 123
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=5.6.0
- atk14/sendmail: 1.* >=1.0.1
- atk14/string-buffer: ^1.2
Requires (Dev)
- atk14/files: *
- atk14/tester: *
This package is auto-updated.
Last update: 2024-12-15 11:59:28 UTC
README
ATK14 Logger provides logging infrastructure for the ATK14 Framework.
Basic usage
define("LOGGER_DEFAULT_LOG_FILE","/path/to/app/log/log");
define("LOGGER_DEFAULT_NOTIFY_EMAIL","webmaster@example.com");
$logger = new Logger("import_articles");
// do something
$logger->info("Total articles to import ".sizeof($articles));
// in order to write buffered messages to a file, just call flush() method
$logger->flush();
// a the end of a script call flushAll();
$logger->flushAll();
Levels of messages importance
$logger->debug("some debug information");
$logger->info("a message");
$logger->warn("a warning");
$logger->error("error message");
$logger->security("a security message");