Append message to JBoss Console using jboss-log4j.xml -
I am unable to attach the message to the JBoss console from my application. The following changes are made in the I jboss-log4j.xml configuration file Gone:
& lt; Category name = "com.tricubes" & gt; & Lt; Priority value = "INFO" /> & Lt; Epander-reef ref = "console" /> & Lt; / Category & gt;
This is my code:
public class OneToOneValidation2 {Private static last logger logger = logger. Tag ("com.tricubes"); Public boolean valid (byte [] fpImage, byte [] fpTemplate, string description, string ticket) {... logger.info ("BES info: Socket MSG SENT" + Intobitarere (x)); ... come back; }
}
What am I missing?
TIA!
Edited:
Console appenders are also the default appenders used by Jebos.
& lt; Appender Name = "console" class = "org.apache.log4j.ConsoleAppender" & gt; & Lt; ErrorHandler class = "org.jboss.logging.util.OnlyOnceErrorHandler" /> & Lt; Param name = "target" value = "system.out" /> & Lt; Param name = "threshold" value = "INFO" /> & Lt; Layout class = "org.apache.log4j.PatternLayout" & gt; & Lt ;! - Default Pattern: Date preference [Category] Message \ n - & gt; & Lt; Param name = "ConversionPattern" value = "% d {ABSOLUTE}% -5p [% c {1}]% M% n" /> & Lt; / Layout & gt;
I have tried both with both org.jboss.logging.Logger and org.apache.log4j.Logger;
category
has been deprecated ( logger
Use), and priority
is not recommended (use level
). So your config block should be:
& lt; Name of logger = "com.tricubes" & gt; & Lt; Level value = "INFO" /> & Lt; Epander-reef ref = "console" /> & Lt; / Logger & gt;
In addition, what is your CONSOLE
appended? If it does not point to the JBoss console, then it is not logged in.
Comments
Post a Comment