colinsurprenant / redstorm

JRuby on Storm
Other
298 stars 56 forks source link

Support Logging Named Hierarchies #111

Closed arielvalentin closed 5 years ago

arielvalentin commented 10 years ago

When trying to configure logback system I am unable to use the named hierarchy feature because they use dots, however Ruby class names have double colons:

ruby @log ||= Java::OrgSlf4j::LoggerFactory.get_logger(self.name)


One way to fix this is to substitute colons with dots:

``` ruby
 @log ||= Java::OrgSlf4j::LoggerFactory.get_logger(self.name.gsub(/::/,'.')) 

Then then one could register the loggers like this:

xml

colinsurprenant commented 10 years ago

Again(!) thanks for the hint! relates to #110