I cannot write log messages to syslog. Any help would be great. Here is my simple log4j program
import org.apache.log4j.Logger; import java.io.*; import java.sql.SQLException; import java.util.*; public class log4jExample { static Logger log = Logger.getLogger(log4jExample.class.getName()); public static void main(String[] args) throws IOException,SQLException { log.error("Hello this is an error message"); log.info("Hello this is an info message"); log.fatal("Fatal error message"); } }
My syslog properties file
source share