Hello. Can I ask for some general materials on LogKit subproduct? May be a
couple of words as to relation to Log4j will be useful. Finally, I have the
following concrete problem. The following code produces node list with
entries wrapping my messages into "<![CDATA[...". What is the easiest way to
get rid of those wrappers and to have my output a valid XML with a root tag?
-------------source-------------------------------------
      File logFile = new File ("log/my.xml.log");
      boolean isAppendTo = false;
      FileTarget myLogTarget = new FileTarget (logFile, isAppendTo, new
XMLFormatter());
      String DEFAULT_LOG_PRIORITY = "INFO";
      Properties myProperties = new Properties();
      myProperties.setProperty ("server.log.priority", "DEBUG");
      String myPriorityString = myProperties.getProperty
("session.log.priority", DEFAULT_LOG_PRIORITY);
      Priority myvPriority = Priority.getPriorityForName (myPriorityString);
      Logger myLogger = Hierarchy.getDefaultHierarchy().getLoggerFor ("my");
      myLogger.setLogTargets (new LogTarget[] {myLogTarget});
      myLogger.setPriority (myvPriority);
      int logCount = 3;
      println ("myLogger = " + myLogger);
      println ("logCount = " + logCount);
      for (int logIteration = 0; logIteration < logCount; logIteration++)
      {
         myLogger.info ("my message for log entry " + logIteration);
      }
      myLogTarget.close();
-----------output----------
<log-entry>
  <time>1002217895534</time>
  <priority>INFO</priority>
  <category>my</category>
  <message><![CDATA[my message for log entry 0]]></message>
</log-entry>
<log-entry>
  <time>1002217895534</time>
  <priority>INFO</priority>
  <category>my</category>
  <message><![CDATA[my message for log entry 1]]></message>
</log-entry>
<log-entry>
  <time>1002217895534</time>
  <priority>INFO</priority>
  <category>my</category>
  <message><![CDATA[my message for log entry 2]]></message>
</log-entry>



Hello to all honorable members of Log4j list. I would appreciate your
general comment on the libraty Jakarta/Avalon/LogKit  that you do not
mention as your peer in documentation. My company decided to use it noting
that they used to have some  compatibility issues with Log4j-Weblogic in the
past. LogKit is scarcely documented and has no specific mailing list. If you
share concepts with that project, can I ask some questions on your list
instead? Particularly, their XMLFormatter outputs  event elements with no
wrapping root. If you do the same for economical reasons, what is a general
way to query such  semi-documents?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to