Formatters for logger.
To install it, add the gem to your Gemfile:
gem 'spine-logging'
Then run bundle
. If you're not using Bundler, just gem install spine-logging
.
Logging to file:
logger = Spine::Logging.file('development')
logger.info('Hey')
# [INFO 2015-05-27T10:35:27.377Z #9883] Hey
Logging to standard output:
logger = Spine::Logging.output
logger.info('Hey')
# [INFO 2015-05-27T10:35:27.377Z #9883] Hey
Logging to syslog:
Spine::Logging.extend(Spine::Logging::Logs::Syslog)
logger = Spine::Logging.syslog('my_app')
logger.info('Hey')
# Hey