-
1. Re: Is Custom Logging Approach still valid ?
rareddy Oct 19, 2012 3:49 PM (in response to sivajd)Siva,
You are right. It may not work 8.x. I need to do some investigation as to what is right approach for 8.2. I will let you know.
Ramesh..
-
2. Re: Is Custom Logging Approach still valid ?
rareddy Oct 19, 2012 5:01 PM (in response to sivajd) -
3. Re: Is Custom Logging Approach still valid ?
sivajd Oct 22, 2012 3:00 PM (in response to rareddy)Ramesh,
In the log4j version when we extended the AppenderSkeleton as CustomAppender, in the "
protected
void
append(LoggingEvent event)" method, we could get a handle to the CommandLogMessage class. Look at https://docs.jboss.org/author/display/teiid81final/Custom+Logging
There we had an option to log the information available in the CommandLogMessage instance. CommandLogMessage class had the complete context information available and we could log what ever we want. In the new approach that you mentioned we do not get access to the CommandLogMessage instance but we get a handle to the serialized (based on toString() method) instance of CommandLogMessage class. When we do not have handle to the CommandLogMessage then we have lost quite a bit of the context information. In the current situation, what should be our approach to get the same information ?
In the current situation when we extend Handler we have access to java.util.logging.LogRecord (org.jboss.logmanager.ExtLogRecord at runtime). The ExtLogRecord has the NDC and MDC available, where the context information can be captured and made available for the someone extending the Handler class to log the information. Is it possible for you all to make this available as a fix for the current version ? If you cannot provide a fix, Is it possible for you to suggest a mechanism / approach / solution where we could get the same info ?
Appreciate your help very much.
Thanks
Siva
-
4. Re: Is Custom Logging Approach still valid ?
rareddy Oct 22, 2012 4:05 PM (in response to sivajd)In the log4j version when we extended the AppenderSkeleton as CustomAppender, in the "
protected
void
append(LoggingEvent event)" method, we could get a handle to the CommandLogMessage class. Look at https://docs.jboss.org/author/display/teiid81final/Custom+Logging
There we had an option to log the information available in the CommandLogMessage instance. CommandLogMessage class had the complete context information available and we could log what ever we want. In the new approach that you mentioned we do not get access to the CommandLogMessage instance but we get a handle to the serialized (based on toString() method) instance of CommandLogMessage class. When we do not have handle to the CommandLogMessage then we have lost quite a bit of the context information. In the current situation, what should be our approach to get the same information ?
This is in the earlier version of Teiid like 7.7 right?
-
5. Re: Is Custom Logging Approach still valid ?
sivajd Oct 22, 2012 6:25 PM (in response to rareddy)Ramesh,
Current version where I am trying to implement this is JBoss AS 7.1.1.Final and Teiid - 8.1.0.Final.
Though the documentation at the following URL https://docs.jboss.org/author/display/teiid81final/Custom+Logging says teiid81Final it is only applicable to Teiid 7.X versions and definitely not to 8.1.0.Final
Hope I am clear.
Thanks
Siva
-
6. Re: Is Custom Logging Approach still valid ?
rareddy Oct 23, 2012 4:54 PM (in response to sivajd)I made required changes and updated the documentaion. The change will be available in the next release 8.2CR1 which will come out some time next week. https://docs.jboss.org/author/display/TEIID/Custom+Logging
-
7. Re: Is Custom Logging Approach still valid ?
sivajd Oct 23, 2012 5:53 PM (in response to rareddy)Ramesh,
This change would be of tremendous help. Thank you for your prompt action and the alternative. This is mighty nice. I will try to get the nightly build tomorrow and try to check it out. Really appreciate your help.
Thanks
Siva