[teiid-issues] [JBoss JIRA] Updated: (TEIID-1612) Tried a custom log appended, but the LoggingEvent.getMessage() returns org.teiid.logging.LogMessage and not org.teiid.logging.CommandLogMessage

Van Halbert (JIRA) jira-events at lists.jboss.org
Fri May 27 07:16:01 EDT 2011


     [ https://issues.jboss.org/browse/TEIID-1612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Van Halbert updated TEIID-1612:
-------------------------------

    Description: 
Tried to create a custom logger, following what the doc says:
------
If you want to build a custom appender for command logging that will have access to log4j "LoggingEvents" to the "COMMAND_LOG" context, it will have a message that is an instance of org.teiid.logging.CommandLogMessage defined in the teiid-api-7.4.jar use these class in your development.
-------
but the actual object type from event.getMessage() is:  LOGGING EVENT MSG TYPE: org.teiid.logging.LogMessage
(this is a sysout from the custom appender)
And there, don't have access to the similar methods provided n CommandLogMessage.

Note, I did receive a ClassCastException when originally tried to cast the event object to CommandLogMessage.

I'll attach the code.

Did I implement something incorrectly?

  was:
Tried to create a custom logger, following what the doc says:
------
If you want to build a custom appender for command logging that will have access to log4j "LoggingEvents" to the "COMMAND_LOG" context, it will have a message that is an instance of org.teiid.logging.CommandLogMessage defined in the teiid-api-7.4.jar use these class in your development.
-------
but the actual object type from event.getMessage() is:  LOGGING EVENT MSG TYPE: org.teiid.logging.LogMessage
(this is a sysout from the custom appender)
And there, don't have access to the similar methods provided n CommandLogMessage.

I'll attach the code.

Did I implement something incorrectly?



> Tried a custom log appended, but the LoggingEvent.getMessage() returns org.teiid.logging.LogMessage and not org.teiid.logging.CommandLogMessage
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TEIID-1612
>                 URL: https://issues.jboss.org/browse/TEIID-1612
>             Project: Teiid
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 7.1.1
>            Reporter: Van Halbert
>            Assignee: Steven Hawkins
>         Attachments: CommandLogger.java
>
>
> Tried to create a custom logger, following what the doc says:
> ------
> If you want to build a custom appender for command logging that will have access to log4j "LoggingEvents" to the "COMMAND_LOG" context, it will have a message that is an instance of org.teiid.logging.CommandLogMessage defined in the teiid-api-7.4.jar use these class in your development.
> -------
> but the actual object type from event.getMessage() is:  LOGGING EVENT MSG TYPE: org.teiid.logging.LogMessage
> (this is a sysout from the custom appender)
> And there, don't have access to the similar methods provided n CommandLogMessage.
> Note, I did receive a ClassCastException when originally tried to cast the event object to CommandLogMessage.
> I'll attach the code.
> Did I implement something incorrectly?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the teiid-issues mailing list