Hello,
I am getting multiple logs for the same log in my source code. What's more,
is the number of duplicate logs are incremental.
ex:
the first log logs one,
the second logs twice,
....
the nth log logs n tiime.
etc...
Can anyone help discover the solution to my problem?
In my project, the logging is accessible from only one class. Here is where
the magic happens:
import org.apache.log4j.Logger;
import org.apache.log4j.BasicConfigurator;
public class ABCmodLogger
{
....
.... <cut>
....
/**
* Uses the Log4Java package to log a message of the given
* severity.
* @param severity The severity of the log message.
* @param message The message to be logged.
* @param arg The Class object of the calling class.
*/
public void log(int severity, String message, Class arg)
{
Logger logger = Logger.getLogger(arg);
BasicConfigurator.configure();
switch(severity)
{
case INFO:
{
logger.info(message);
break;
}
...
... <cut>
...
case DEBUG:
default:
{
logger.debug(message);
break;
}
}
}
}
Thanks,
Ben.
_________________________________________________________________
Experience Live Search from your PC or mobile device today.
http://www.live.com/?mkt=en-ca
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]