Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Torquebox logger and tagged logging #182

Closed
johnthethird opened this issue May 29, 2014 · 0 comments
Closed

Torquebox logger and tagged logging #182

johnthethird opened this issue May 29, 2014 · 0 comments

Comments

@johnthethird
Copy link
Contributor

I have a Rails 3.2 app running on TB 3.0.0 and it has been working fine with the tagged logging feature.

I recently upgraded the app to Rails4 and TB 3.1.0, and the tagged logging stopped working. The log entries did appear but without the tags. In investigating this further, specifically the TB Logger class, I cant see how tagged logging ever worked in the first place. There is an accessor for the formatter to be set, but it is never used. I assume the org.jboss.logging::Logger doesnt know anything about a formatter, so it is up to us to call the formatter before sending the message on to the jboss logger.

So, I restructured the class to behave more like the standard Ruby logger, where the methods all call add, which takes care of calling the formatter. Also, even though jboss has its own logging level, it makes sense to be able to set the Rails level and have things work accordingly (i.e. not executing log messages passed as a &block if below the current log level).

The class is here and I would love some feedback on this and if I am on the right track or did I miss something?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants