Hello again,

Been trying to trouble shoot my syslog testing.  I turned off iptables 
completely just to make sure it was not getting in the way.  I then added the 
following to my /etc/rsyslog.conf file to make sure that even remote clients 
can log:

# Options to syslogd
# -m 0 disables 'MARK' messages.
# -r enables logging from remote machines
# -x disables DNS lookups on messages received with -r
# See syslogd(8) for more details

SYSLOGD_OPTIONS="-m 0 -r -x"

I then restarted syslog:

/sbin/service syslog restart

I also checked to make sure messages with level info go to /var/log/messages

My configuration for this looks like this:

*.info;mail.none;authpriv.none;cron.none                /var/log/messages

Which I think means that all messages with level info will end up in 
/var/log/messages, except for those from mail, authpriv, and cron.

I then tried running my test (Below), but the there's still no message in 
/var/log/messages.  Any ideas?

Thanks,
- Ole

The Test:

/**
* Unit test for simple App.
*/
public class Log4JTest extends TestCase
{
        Logger logger = Logger.getLogger(Log4JTest.class.getName());
        
        SyslogAppender syslogAppender = new SyslogAppender();

        public void setUp()
        {
                BasicConfigurator.configure();
                
                syslogAppender.setSyslogHost("localhost");
                
                syslogAppender.setFacility("LOCAL0");
                
                syslogAppender.setLayout(new PatternLayout());
                
       syslogAppender.activateOptions();
logger.addAppender(syslogAppender); }
   public void testApp()
   {
        logger.info("I'm logging with syslog");
    }
}

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

Reply via email to