tumblr / genesis

A tool for data center automation
http://tumblr.github.io/genesis/
Apache License 2.0
155 stars 24 forks source link

Log DSL method has no support for severity levels #54

Closed byxorna closed 7 years ago

byxorna commented 8 years ago

https://github.com/tumblr/genesis/blob/master/src/framework/lib/genesisframework/task.rb#L98-L100 does not support an optional level parameter. This may be useful for things like logging to elasticsearch or collins, so one may optionally specify the level of the log message from the task. As it exists now, all log messages in tasks (i.e. using https://github.com/tumblr/genesis/blob/master/tasks/modules/logging/collins.rb) will appear the same level, making it very confusing to debug error messages at level "info".

Ideally, the task DSL would allow for: log "Running a thing" as well as log "shit, something exploded", :error.