Re: [Log4sh-users] Log4sh on RHEL4
Brought to you by:
sfsetse
From: Kate W. <kat...@fo...> - 2007-08-08 20:36:31
|
Jay, Looking at your script, I noticed that the default logging level is never changed, and that your mySyslog appender doesn't have a level set. By default, the logging level it is ERROR, so to increase it to TRACE (for example) you will need to add the following line to your script somewhere before your logging commands. logger_setLevel TRACE Alternatively, you can set the appender itself to the DEBUG level (for example) by adding the following before your appender_activateOptions()call. appender_setLevel mySyslog DEBUG - kate On 8/8/07, Kate Ward <kat...@fo...> wrote: > > With 1.5.0 in particular, there is a bug with a 'none' configuration. Grab > the latest release from Subversion from the link below. It should fix the > rest of the logging levels. I'll look at your scripts when I get home > tonight. > > > http://log4sh.svn.sourceforge.net/svnroot/log4sh/trunk/source/1.5/src/shell/log4sh > > - kate > > On 8/8/07, jay <tit...@gm...> wrote: > > > > Kate, > > > > I've tried some more tests with 1.5.0. Seems I can now get ERROR and > > FATAL logging working. Nothing else will log. > > > > My syslog is configured for such: > > local5.none /var/log/messages > > local5.* /var/log/log4sh.log > > > > New script I was testing: > > http://cs.selu.edu/~jholland/test <http://cs.selu.edu/%7Ejholland/test> > > > > Output of script with -x option: > > http://cs.selu.edu/~jholland/command.log.gz > > <http://cs.selu.edu/%7Ejholland/command.log.gz> > > > > > > Thanks for your help, hope we can find the problem. > > > > Jay > > > > On 8/8/07, Kate Ward <kat...@fo... > wrote: > > > > > > Could you run your script with a -x option (either by adding it to the > > > sha-bang line, or with a set -x), and put the output somewhere where I could > > > grab it? > > > > > > - kate > > > > > > On 8/8/07, jay <tit...@gm...> wrote: > > > > > > > > Forgot to include that I'm using log4sh version 1.4.2 with netcat > > > > version 1.10. I'm going to try 1.5.0 later and see if that has > > > > different results. > > > > > > > > Jay > > > > > > > > On 8/8/07, jay <tit...@gm...> wrote: > > > > > > > > > > Helllo, > > > > > > > > > > I'm trying to get remote logging using log4sh working on a RHEL4 > > > > > update 5 box. I'm having a bit of trouble. > > > > > > > > > > I ran all of the tests, and local logging works fine, so I know > > > > > log4sh runs ok on that release. When I try the sample for remote logging, I > > > > > get nothing. I've tested the remote logging with other methods (python) and > > > > > it works, so I know its setup correctly. I've tried setting the > > > > > LOG4SH_DEBUG environment variable, but I get nothing that could help. No > > > > > errors in fact. I have run tcpdump on the other end on port 514, and > > > > > nothing is showing up on the wire. Here is the test script I'm using > > > > > > > > > > #!/bin/sh > > > > > > > > > > # load log4sh (disabling properties file warning) and clear the > > > > > default > > > > > # configuration > > > > > LOG4SH_CONFIGURATION='none' . ./log4sh > > > > > log4sh_resetConfiguration > > > > > > > > > > # set alternative 'nc' command > > > > > log4sh_setAlternative nc /usr/bin/nc > > > > > > > > > > # add and configure a SyslogAppender that logs to a remote host > > > > > logger_addAppender mySyslog > > > > > appender_setType mySyslog SyslogAppender > > > > > appender_syslog_setFacility mySyslog local4 > > > > > appender_syslog_setHost mySyslog cbtsscdb > > > > > appender_activateOptions mySyslog > > > > > > > > > > # say Hello to the world > > > > > logger_info 'Hello, world' > > > > > > > > > > Is there something else I could try to troubleshoot this? Thanks > > > > > for any help. > > > > > > > > > > Jay > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.net email is sponsored by: Splunk Inc. > > > > Still grepping through log files to find problems? Stop. > > > > Now Search log events and configuration files using AJAX and a > > > > browser. > > > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > > _______________________________________________ > > > > log4sh-users mailing list > > > > log...@li... > > > > https://lists.sourceforge.net/lists/listinfo/log4sh-users > > > > > > > > > > > > > > > > > -- > > > Kate Ward < kat...@fo...> > > > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > log4sh-users mailing list > > log...@li... > > https://lists.sourceforge.net/lists/listinfo/log4sh-users > > > > > > > -- > Kate Ward <kat...@fo...> > -- Kate Ward <kat...@fo...> |