You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.
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?
The text was updated successfully, but these errors were encountered:
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 theorg.jboss.logging::Logger
doesnt know anything about aformatter
, 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?
The text was updated successfully, but these errors were encountered: