2 Replies Latest reply on Nov 26, 2011 1:55 AM by Nick G

    Problem with logging handler encoding

    Nick G Newbie

      Hi all.

       

      I try to set encoding on logging handler in jboss-logging.xml

       

      <periodic-rotating-file-handler

       

          file-name="${jboss.server.log.dir}/file.log"

          name="FileAppender"

          encoding="UTF-8"

          autoflush="true"

          append="true"

          suffix=".yyyy-MM-dd">

       

          <error-manager>

              <only-once />

          </error-manager>

       

          <formatter>

              <pattern-formatter pattern="%d %-5p [%c] (%t) %m%n" />

          </formatter>

      </periodic-rotating-file-handler>

       

      and get error on method info:

       

      21:40:12,143 ERROR [STDERR] LogManager error of type FLUSH_FAILURE: Error on flush

      21:40:12,143 ERROR [STDERR] java.io.IOException: Неверный дескриптор

      21:40:12,144 ERROR [STDERR]   at java.io.FileOutputStream.writeBytes(Native Method)

      21:40:12,144 ERROR [STDERR]   at java.io.FileOutputStream.write(FileOutputStream.java:260)

      21:40:12,144 ERROR [STDERR]   at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)

      21:40:12,144 ERROR [STDERR]   at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)

      21:40:12,177 ERROR [STDERR]   at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)

      21:40:12,177 ERROR [STDERR]   at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)

      21:40:12,177 ERROR [STDERR]   at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)

      21:40:12,177 ERROR [STDERR]   at org.jboss.logmanager.handlers.WriterHandler.safeFlush(WriterHandler.java:162)

      21:40:12,177 ERROR [STDERR]   at org.jboss.logmanager.handlers.WriterHandler.flush(WriterHandler.java:133)

      21:40:12,177 ERROR [STDERR]   at org.jboss.logmanager.ExtHandler.doPublish(ExtHandler.java:92)

      21:40:12,178 ERROR [STDERR]   at org.jboss.logmanager.handlers.WriterHandler.doPublish(WriterHandler.java:70)

      21:40:12,178 ERROR [STDERR]   at org.jboss.logmanager.ExtHandler.publish(ExtHandler.java:64)

      21:40:12,178 ERROR [STDERR]   at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:283)

      21:40:12,178 ERROR [STDERR]   at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)

      21:40:12,178 ERROR [STDERR]   at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)

      21:40:12,178 ERROR [STDERR]   at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)

      21:40:12,179 ERROR [STDERR]   at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)

      21:40:12,179 ERROR [STDERR]   at org.jboss.logmanager.LoggerNode.publish(LoggerNode.java:291)

      21:40:12,179 ERROR [STDERR]   at org.jboss.logmanager.Logger.logRaw(Logger.java:649)

      21:40:12,179 ERROR [STDERR]   at org.jboss.logmanager.Logger.log(Logger.java:600)

      21:40:12,179 ERROR [STDERR]   at org.jboss.logmanager.Logger.log(Logger.java:612)

      21:40:12,179 ERROR [STDERR]   at org.jboss.logging.JBossLogManagerLogger.doLog(JBossLogManagerLogger.java:44)

      21:40:12,180 ERROR [STDERR]   at org.jboss.logging.Logger.info(Logger.java:664)

       

      Version of JBoss: JBoss 6.0.0.20100911-M51

       

      If encoding is absent then all is fine.

       

      Please help me. What I do wrong?

       

      Thanks