Adhearsion includes a comprehensive logging system, powered by the Logging gem, where every class has a logger of its own, and every object may have a logger if it implements #logger_name
. This makes for highly context-aware logging, and the possibility of easy application-specific logging.
In order to write to the log (eg at INFO level), simply do the following:
logger.info "This will be printed at INFO level."
The default available log levels are TRACE, DEBUG, INFO, WARN, ERROR, FATAL.
By default, the logs are output to log/adhearsion.log and stdout.
You may change the location of the log file by altering the config.platform.logging.outputters
config setting, like so:
ADHEARSION_PLATFORM_LOGGING_OUTPUTTERS=/var/log/adhearsion.log ahn start -
See the logging gem.
See the logging gem.
See the logging gem.