1 Reply Latest reply on Oct 2, 2003 1:05 PM by nic7834

    log4j and my server instance(s)

    James Ward Newbie

      I have a few JBoss instances all running on the same server. If ERROR level events are generated in any instance, log4j email's the error to me. The problem is that sometimes it is very hard to discern from the generated email which instance of JBoss had the error. Is there any way I can dynamically add the instance name or some other uniquely identifyable thing to the email which get's sent? I know I can just change the Subject in each log4j.xml file, but I like having 1 log4j.xml which I use for every instance.

      Thanks in advance for helping.

      -James

        • 1. Re: log4j and my server instance(s)
          nic7834 Newbie

          Hi there

          I'm just getting going with JBoss and Log4j.

          How about having each JBoss instance generate its own string identifier. Then when you use Log4J to log the event that generates the email, include the string identifier in the log message.

          From the looks of the appender setup, it doesn't seem like it's possible to customize the text for the email subject on each logging action.

          Incidentally, can you elaborate on your setting for the email appender. I can't get it going on a Windows XP machine. Specifically, what value for the SMTPHost are you using? Is this the IP address of your POP3 provider?

          Also does the BufferSize value mean the queue? I assume a value of 1 means send out the email immediately, 5 would mean wait for 5 messages before sending. Right?

          ======================================





          <param name="SMTPHost" value="localhost"/>
          <param name="BufferSize" value="10"/>