https://issues.apache.org/bugzilla/show_bug.cgi?id=44945
Summary: SyslogAppender not working
Product: Log4j
Version: 1.2
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Appender
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
I've tried with the latest 1.2.14 and 1.2.15 and the SyslogAppender does not
appear to be working in either one.
/etc/syslog.conf contains LOCAL7.* /var/log/jboss.log
Java code:
[code]
public class Test {
static Logger logger = Logger.getLogger(Test.class);
public static void main(String[] args) {
PatternLayout pattern = new PatternLayout();
pattern.setConversionPattern("[%d{ABSOLUTE},%c{1}] %m%n");
ConsoleAppender console = new ConsoleAppender();
console.setName("CONSOLE");
console.setLayout(pattern);
console.setTarget(ConsoleAppender.SYSTEM_OUT);
//console.setWriter();
console.setThreshold(Priority.DEBUG);
SyslogAppender syslog = new SyslogAppender();
syslog.setName("SYSLOG");
syslog.setSyslogHost("localhost");
syslog.setFacility("LOCAL7");
syslog.setFacilityPrinting(true);
syslog.setLayout(pattern);
console.activateOptions();
syslog.activateOptions();
logger.addAppender(console);
logger.addAppender(syslog);
logger.info("Test message.");
}
}
[/code]
Messages are logged to the console as expected but nothing gets logged to the
syslog.
-Samuel
Internal ref: 176164
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]