Class | Innate::LogHub |
In: |
lib/innate/log/hub.rb
|
Parent: | Object |
Innate only provides logging via stdlib Logger to avoid bloat and dependencies, you may specify multiple loggers in the Log instance of LogHub to accomendate your needs, by default we log to $stderr to be compatible with CGI.
Please read the documentation of logger.rb (or even better, its source) to get a feeling of how to use it correctly within Innate
A few shortcuts:
logger = Logger.new($stdout) logger = Logger.new($stderr)
logger = Logger.new('test.log')
file = File.open('test.log', 'a+') logger = Logger.new(file)
# 10 files history, 5 MB each logger = Logger.new('test.log', 10, (5 << 20)) # 100 files history, 1 MB each logger = Logger.new('test.log', 100, (1 << 20))
logger = Logger.new('test.log', 'daily') logger = Logger.new('test.log', 'weekly') logger = Logger.new('test.log', 'monthly')
active | [RW] | |
loggers | [RW] | |
program | [RW] |