<div dir="ltr"><div><div><div>Hi Dominique,<br><br></div>Add<br><br>log4j.appender.myappender.header = true<br><br></div>and see if you get the hostname<br><br></div>Ravi<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 9, 2016 at 9:37 AM, Dominique Taffin <span dir="ltr"><<a href="mailto:dominique.taffin@1und1.de" target="_blank">dominique.taffin@1und1.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello!</p>
<p><br>
</p>
<p>We are using the log4j extension to send ovirt logs to a logstash server. </p>
<p>As we do have several engine hosts and only one logging backend, we do need to filter logs by hostname. So far I am unable to provide a hostname in</p>
<p>Log4jLogger.properties. All Log4j configurations we have in other applications/servers to honor the log4j.Application property. I tried setting it up by:</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><a href="http://ovirt.engine.extension.name" target="_blank">ovirt.engine.extension.name</a> = Log4j<br>
ovirt.engine.extension.provides = org.ovirt.engine.api.extensions.logger.Logger<br>
ovirt.engine.extension.bindings.method = jbossmodule<br>
ovirt.engine.extension.binding.jbossmodule.module = org.ovirt.engine-extensions.logger.log4j<br>
ovirt.engine.extension.binding.jbossmodule.class = org.ovirt.engineextensions.logger.log4j.Log4jLogger<br>
log4j.rootLogger=DEBUG, myappender<br>
<br>
log4j.appender.myappender = org.apache.log4j.net.SyslogAppender<br>
log4j.appender.myappender.SyslogHost = logstash-server.something<br>
log4j.appender.myappender.Port = 5544<br>
log4j.appender.myappender.ReconnectionDelay = 60000<br>
log4j.appender.myappender.Application = ovirthostname<br>
log4j.appender.myappender.LocationInfo = true<br>
log4j.appender.myappender.Threshold = DEBUG<br>
log4j.appender.myappender.layout = org.apache.log4j.PatternLayout<br>
log4j.appender.myappender.layout.ConversionPattern=[%c] %m%n<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Logs do arrive, but no hostname. Can anyone point me out on how to include the hostname in the logs?</p>
<p><br>
</p>
<p>thank you and best,</p>
<p> Dominique<br>
</p>
</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>