Menu

Log4plsql not sending messages with threshold

Help
2004-06-07
2004-06-07
  • Nobody/Anonymous

    Hi,
    We are trying to send the messages with log4j background process and found the following problem.

    Appenders are not getting the messages from log4plsql if the threshold is set.
    log4j.appender.A2.threshold=INFO

    We have tested this with File, Socket as well as other appenders. The initialization messages are coming but the messages from the DB Pipe which uses 'dbLogger.callAppenders(event)' to log, are not coming.
    The problem that we have analysed is:
    Log4plsql uses Dynamic Loglevel for the logging purpose. It reads the level values from the Database (LLEVEL, LSYSLOGEQUIV, LCODE) and constructs the levels.
    Once the message/alert triggers the BackgroundProcess, it converts the level to DynamicLevel and constructs the Logging Event then passes to logger's callAppender(Event).
    As the default level are (0,3,4,6,7 for FATAL,ERROR,WARN,INFO,DEBUG) different from the log4plsql level (20,30,40,50,60 for FATAL,ERROR,WARN,INFO,DEBUG).
    So the appenders are not getting the messages.

    Has anyone encountered the same problem, please respond.

     
    • Manuel Romeiro

      Manuel Romeiro - 2004-06-07

      The problem may be because the diferences between levels defined in Log4PLSQL and Log4J.
      Try to keep de default levels:
      1 - OFF, 2 - FATAL, ..., 6 - DEBUG, 7 - ALL

       
    • Ritu Kohli

      Ritu Kohli - 2004-06-07

      Does that mean that we should keep the Level 0,3,4,6... in the actual table 'TLOGLEVEL'?
      But then 0-(Off & Fatal), 7 - (All, Debug) cannot be inserted because of the Primary Key constraint on column LLEVEL.
      And if we remove the level 'Off' & 'All', what is the impact it will have on plsql logs?

       
      • Manuel Romeiro

        Manuel Romeiro - 2004-06-07

        I never overwrite the default levels, and de default levels are 1 to 7.
        The levels ALL and OFF only help the administrator to enable/disable all log's events.

        The rule for threshold is:
        if (level<=threshold)  send_message(...)
        else do_nothing()

        The PLSQ background process, use de same rule.

        In theory, all would have to be OK, but may be the threshold don't work well, and is possible that it isn't converted to 50 and still 5.
        If you send a INFO (6) from data-base, the log can't be registed, because 6 isn't <= 5.
        Try to send FATAL,ERROR or WARN and verify if the appender catch the log.
        If true, report this bug to Log4J or Log4PLSQL support.

         

Log in to post a comment.