XmlLayoutSchemaLog4j wasn't providing a hostname in its output. The code
would only provide a hostname if the hostname was already in the logging
event. So far, I haven't seen the hostname in any logging event and I
noticed that the other appenders that provide a hostname in their output use
SystemInfo.HostName as the source.
I've solved the problem by making the code in the FormatXml method of
XmlLayoutSchemaLog4j.cs to start like following:
override protected void FormatXml(XmlWriter writer,
LoggingEvent loggingEvent)
{
// Translate logging events for log4j
// Insert hostname property if not already there
if (loggingEvent.Properties["log4jmachinename"] ==
null)
{
loggingEvent.Properties["log4jmachinename"]
= SystemInfo.HostName;
}
Mike Blake-Knox
email: [EMAIL PROTECTED]
TSYS Office: (706) 644-3643
cellphone: (706) 570-4641