G
George Jempty
I'm totally new to log4j. I'm trying to incorporate logging into a
pile of crap -- er, I mean "application" -- I've inherited. I'm doing
this without the benefit of a configuration file, at least on my first
attempt, until I get to understanding log4j better.
The following code of mine....
static Logger ssoLogger;
Appender ssoAppender;
SimpleLayout ssoLayout;
static
{
ssoLogger =
Logger.getLogger(com.americanstandard.lol.common.AccountServlet.class.getName());
ssoLogger.setAdditivity(false);
ssoLogger.setLevel(Level.DEBUG);
}
ssoLayout = new SimpleLayout();
ssoAppender = new FileAppender(ssoLayout, "ssologin.log");
ssoLogger.addAppender(ssoAppender);
//logging statements lower in my code
This is resulting in output like the below. I thought I was going to
get rid of the duplicate entries by calling setAdditivity(false)...see
above code. Any guidance as to how to prevent the entries from being
multiplied will be greatly appreciated. PS....this is a servlet.
George Jempty
FATAL - ********************************************
FATAL - java.lang.NullPointerException
FATAL - null
FATAL - HttpRequestRemoteUser: null
FATAL - ipAddr: 206.44.76.249
FATAL - ticket: null
FATAL - sessionKey: null
FATAL - docBase: loldev
FATAL - userName: null
FATAL - domainName:
FATAL - blnLoginSuccess: true
FATAL - ********************************************
FATAL - ********************************************
FATAL - java.lang.NullPointerException
FATAL - java.lang.NullPointerException
FATAL - null
FATAL - null
FATAL - HttpRequestRemoteUser: null
FATAL - HttpRequestRemoteUser: null
FATAL - ipAddr: 206.44.76.249
FATAL - ipAddr: 206.44.76.249
FATAL - ticket: null
FATAL - ticket: null
FATAL - sessionKey: null
FATAL - sessionKey: null
FATAL - docBase: loldev
FATAL - docBase: loldev
FATAL - userName: null
FATAL - userName: null
FATAL - domainName:
FATAL - domainName:
FATAL - blnLoginSuccess: true
FATAL - blnLoginSuccess: true
pile of crap -- er, I mean "application" -- I've inherited. I'm doing
this without the benefit of a configuration file, at least on my first
attempt, until I get to understanding log4j better.
The following code of mine....
static Logger ssoLogger;
Appender ssoAppender;
SimpleLayout ssoLayout;
static
{
ssoLogger =
Logger.getLogger(com.americanstandard.lol.common.AccountServlet.class.getName());
ssoLogger.setAdditivity(false);
ssoLogger.setLevel(Level.DEBUG);
}
ssoLayout = new SimpleLayout();
ssoAppender = new FileAppender(ssoLayout, "ssologin.log");
ssoLogger.addAppender(ssoAppender);
//logging statements lower in my code
This is resulting in output like the below. I thought I was going to
get rid of the duplicate entries by calling setAdditivity(false)...see
above code. Any guidance as to how to prevent the entries from being
multiplied will be greatly appreciated. PS....this is a servlet.
George Jempty
FATAL - ********************************************
FATAL - java.lang.NullPointerException
FATAL - null
FATAL - HttpRequestRemoteUser: null
FATAL - ipAddr: 206.44.76.249
FATAL - ticket: null
FATAL - sessionKey: null
FATAL - docBase: loldev
FATAL - userName: null
FATAL - domainName:
FATAL - blnLoginSuccess: true
FATAL - ********************************************
FATAL - ********************************************
FATAL - java.lang.NullPointerException
FATAL - java.lang.NullPointerException
FATAL - null
FATAL - null
FATAL - HttpRequestRemoteUser: null
FATAL - HttpRequestRemoteUser: null
FATAL - ipAddr: 206.44.76.249
FATAL - ipAddr: 206.44.76.249
FATAL - ticket: null
FATAL - ticket: null
FATAL - sessionKey: null
FATAL - sessionKey: null
FATAL - docBase: loldev
FATAL - docBase: loldev
FATAL - userName: null
FATAL - userName: null
FATAL - domainName:
FATAL - domainName:
FATAL - blnLoginSuccess: true
FATAL - blnLoginSuccess: true