Aiki Log
From Aikiframework wiki
| +This section is incomplete. You can help by expanding it. |
This page contains a brief overview of using the Aiki log utility
Aiki Log
The log is a tool to assist developers in tracing bugs, errors and others in the PHP code.
What messages will get logged based on setting the $config["log_level"]:
- ERROR: will log errors only
- WARN: will log errors and warnings
- INFO: will log errors, warnings and information
- DEBUG: will log errors, warnings, information and debug messages
Here's an example of one way to instantiate the log and save some messages:
$config["log_level"] = "debug";
$log = new Log($config["log_dir"],
$config["log_file"],
$config["log_level"],
$system_folder);
$log->message("test message which defaults to debug message");
$log->message("test ERROR", Log::ERROR);
$log->message("test WARN", Log::WARN);
$log->message("test INFO", Log::INFO);
$log->message("test DEBUG", Log::DEBUG);
Configure options related to the log utility:
HTTPD_USER Set the HTTPD user. You may specify a numeric user ID as well.
On Debian-based systems, Apache runs as the user www-data. In
some configurations the user may be set to nobody. Yet in
others, the user may be set to your own user ID. This may be
found in the Apache conifiguration file as: User apache and
Group apache. This will be used by this package for read/write
access to files and directories [default: HTTPD_USER=apache]
AIKI_LOG_DIR
Set the log directory [default:
AIKI_LOG_DIR=$localstatedir/log/$PACKAGE]
AIKI_LOG_FILE
Set the log file name [default: AIKI_LOG_FILE=$PACKAGE.log]
AIKI_LOG_PROFILE
Set the host profile log name [default:
AIKI_LOG_PROFILE=profile.log]
AIKI_LOG_LEVEL
Set the log level where valid values are: NONE, ERROR, WARN,
INFO and DEBUG [default: AIKI_LOG_LEVEL=ERROR]

