Name: mozart-logger
Owner: BBC
Description: Gem for setting up logging and metrics for Mozart services
Created: 2016-01-18 14:55:09.0
Updated: 2016-03-17 13:59:46.0
Pushed: 2016-07-25 11:29:34.0
Size: 10
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Internal gem for setting up structured logging and metrics for use within our Mozart service applications.
It is an abstraction wrapping around our open-source software Alephant Logger.
Add this line to your application's Gemfile:
p :production do
m "mozart-logger", "1.0.0", :git => "git@github.com:bbc/mozart-logger.git"
And then execute:
$ bundle install
ire "mozart/logger"
= {
tatsd => {
:host => ENV["STATSD_HOST"],
:port => 8125,
:namespace => "mozart-routing"
loudwatch => {
:namespace => ENV["CLOUDWATCH_NAMESPACE"]
rt::Logger.setup opts, ENV["APP_LOG_LOCATION"] # configures Alephant Logger
Rack::CommonLogger, Alephant::Logger.get_logger # optional
Note: you should only provide one key
either:statsd
or:cloudwatch
the latter will be ignored if both provided
ire "alephant/logger"
s Foo
clude include Alephant::Logger
f initialize
logger.info(
"event" => "ClassInitialized",
"method" => "#{self.class.name}##{__method__}",
"someKey" => 123
)
d
Note: for more details, refer to the following gems
Alephant-Logger-CloudWatch, Alephant-Logger-Statsd and Alephant-Logger-JSON