Hi Ulrik,
Thanks for your time. Thanks Ulrik we'll check your fix and add to the trunk. Actually there was such a bug report related to the same problem. https://issues.apache.org/jira/browse/LOGCXX-442 regards, *Chand Priyankara* [image: Facebook] <http://www.facebook.com/chand.priyankara> [image: LinkedIn] <http://lk.linkedin.com/in/chandpriyankara> [image: Blogger] <http://chandpriyankara.blogspot.com/> [image: Google Plus] <http://plus.google.com/104246340732624023499> |BSc(Eng) - Electrical & Information |(094) 773-361-566 |ch...@engineering.com |http://chandpriyankara.blogspot.com <http://www.iucnredlist.org/amazing-species>sent via internet On Fri, Jan 16, 2015 at 3:51 PM, <ulrik.peder...@diamond.ac.uk> wrote: > Hello, > > > > I have run into a small problem when trying to log to rsyslogd, running on > a non-standard port number (i.e. not 514). When trying to configure the > syslogappender in XML with something like this: > > > > <appender name="syslog" class="org.apache.log4j.net.SyslogAppender"> > > <param name="Facility" value="LOCAL1"/> > > <param name="SyslogHost" value="localhost:5140"/> > > <param name="Threshold" value="DEBUG"/> > > <layout class="org.apache.log4j.PatternLayout"> > > <param name="ConversionPattern" value="%-5p\t%C{2}\t(%F:%L)\t%m%n"/> > > </layout> > > </appender> > > > > The SyslogHost set to “localhost:5140” did not work. Failing with messages > like: > > log4cxx: Cannot get information about host: localhost:5140 > > log4cxx: Could not find localhost:5140. All logging will FAIL. > > log4cxx: Cannot get information about host: localhost:5140 > > > > It turns out that the port number when using a remote syslogd is fixed > with a #define SYSLOG_PORT 514 and the :<port> syntax is ignored or even > causing an error. A bit of searching revealed that log4j **does** > support this syntax, so it seems log4cxx should do the same. > > > > So I have had a go at fixing this – please see the attached patch. It does > the job (i.e. works for me) and is not very complex – but I’m unsure if it > is The Right ™ solution… Please take a look and feel free to adopt this to > the code base if it is useful. > > > > The patch was developed off the svn trunk rev 1652110. > > > > Cheers, > > Ulrik > > > > > > -- > > This e-mail and any attachments may contain confidential, copyright and or > privileged material, and are for the use of the intended addressee only. If > you are not the intended addressee or an authorised recipient of the > addressee please notify us of receipt by returning the e-mail and do not > use, copy, retain, distribute or disclose the information in or attached to > the e-mail. > Any opinions expressed within this e-mail are those of the individual and > not necessarily of Diamond Light Source Ltd. > Diamond Light Source Ltd. cannot guarantee that this e-mail or any > attachments are free from viruses and we cannot accept liability for any > damage which you may sustain as a result of software viruses which may be > transmitted in or with the message. > Diamond Light Source Limited (company no. 4375679). Registered in England > and Wales with its registered office at Diamond House, Harwell Science and > Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom > >