0 Replies Latest reply on Mar 16, 2004 4:21 AM by tonig

    Log4J logging into more than 1 table

    tonig Newbie


      i want to log into a Database, i have more than 1 table where the logdata have to be. My Problem is that i dont know how i can log in more than 1 table (or row). I`ve already edited the log4 properties that i can log into 3 rows, but i doesnt work:

      #log4j config file
      log4j.appender.infoLog.sql=INSERT INTO error (logText, logSource, logDestination) VALUES ('%m', '%m', '%m');

      public static void main(String[] args) {
       SessionBean serverLogger = null;
       serverLogger = serverLogger;
       Logger logger = LoggerBean.getLogger(mylog4jLogger.INFO_LOGGER);
       logger.error("ErrorMessage BLA", "myGreatSource","MyGreatDestination" ); // 2 errors, cuz of 3 parameters

      But if i want to use the Logger i get errors. How can i tell log4j that it gets instead of 1 message, 3 messages? And how can i tell log4j that it has to log in more than 1 table? And whats about relation tables? Can i make 2 inserts, 2 selects and 1 insert? Thats exactly what i need to do later. And where do i have the result of the select?

      Thank ya 4 ur help.