|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectno.feide.moria.log.AccessLogger
public final class AccessLogger
Logs system events in a strict format that may later be used for usage statistics generation. Logging is done at log4j level WARN. If the loglevel of log4j is set above this, no log-entries will be written. The format of the log-lines is the following:
[2004-04-30 17:10:19,046] "BAD USER CREDENTIALS" "no.feide.test" "demo@feide.no" "235892791" "350215527" [Timestamp] "STATUS" "service principal" "userid" "incoming ticket" "outgoing ticket"
Field Summary | |
---|---|
private static java.lang.Class |
ACCESS_LOGGER_CLASS
The name of this logger. |
private org.apache.log4j.Logger |
logger
Log to this logger. |
Constructor Summary | |
---|---|
AccessLogger()
Default constructor. |
Method Summary | |
---|---|
private java.lang.String |
generateLogMessage(AccessStatusType status,
java.lang.String servicePrincipal,
java.lang.String userId,
java.lang.String incomingTicketId,
java.lang.String outgoingTicketId)
Generates log messages in the correct format. |
private org.apache.log4j.Logger |
getLogger()
Returns the logger, instantiates it if not already done. |
void |
logService(AccessStatusType status,
java.lang.String servicePrincipal,
java.lang.String incomingTicketId,
java.lang.String outgoingTicketId)
Logs service-initiated access. |
void |
logUser(AccessStatusType status,
java.lang.String servicePrincipal,
java.lang.String userId,
java.lang.String incomingTicketId,
java.lang.String outgoingTicketId)
Logs user-initiated access (user interaction through the web interface). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.Class ACCESS_LOGGER_CLASS
private transient org.apache.log4j.Logger logger
Constructor Detail |
---|
public AccessLogger()
Method Detail |
---|
public void logUser(AccessStatusType status, java.lang.String servicePrincipal, java.lang.String userId, java.lang.String incomingTicketId, java.lang.String outgoingTicketId)
status
- Indicates the type of event.servicePrincipal
- The id of the service that is responsible for this operation.userId
- The id of the user, may be null if unknown at time of event.incomingTicketId
- The id of the ticket given with the request.outgoingTicketId
- The id of the potentially returned ticket, may be null.public void logService(AccessStatusType status, java.lang.String servicePrincipal, java.lang.String incomingTicketId, java.lang.String outgoingTicketId)
status
- Indicates the type of event.servicePrincipal
- The id of the service that is performing the operation.incomingTicketId
- The id of the ticket given with the request.outgoingTicketId
- The id of the potentially returned ticket, may be null.private java.lang.String generateLogMessage(AccessStatusType status, java.lang.String servicePrincipal, java.lang.String userId, java.lang.String incomingTicketId, java.lang.String outgoingTicketId)
status
- Indicates the type of event.servicePrincipal
- The id of the service that is performing the operation.userId
- The id of the user.incomingTicketId
- The id of the ticket given with the request.outgoingTicketId
- The id of the potentially returned ticket, may be null.
private org.apache.log4j.Logger getLogger()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |