UserLogRecord class

This class is used to create a log record that, if received by an instance of AgentryHandler, will be routed to a user-specific log file on the Agentry server.

Syntax

public class UserLogRecord extends LogRecord

Members

All members of UserLogRecord, including inherited members.

Constructors
Modifier and Type Constructor Description
public UserLogRecord(User, Level, String) Constructs a new UserLogRecord object.
public UserLogRecord(User, LogRecord) Constructs a new UserLogRecord object that copies all of its information from an existing LogRecord object.
Methods
Modifier and Type Method Description
public boolean equals(Object)  
public Level getLevel()  
public String getLoggerName()  
public String getMessage()  
public long getMillis()  
public Object[] getParameters()  
public ResourceBundle getResourceBundle()  
public String getResourceBundleName()  
public long getSequenceNumber()  
public String getSourceClassName()  
public String getSourceMethodName()  
public int getThreadID()  
public Throwable getThrown()  
public User getUser() Returns the user that this log record pertains to.
public int hashCode()  
public void setLevel(Level)  
public void setLoggerName(String)  
public void setMessage(String)  
public void setMillis(long)  
public void setParameters(Object[])  
public void setResourceBundle(ResourceBundle)  
public void setResourceBundleName(String)  
public void setSequenceNumber(long)  
public void setSourceClassName(String)  
public void setSourceMethodName(String)  
public void setThreadID(int)  
public void setThrown(Throwable)  
public String toString()  

Usage

You can create instances of this class directly and hand them off to Logger objects to log user-specific messages, but it is far more convenient to use the UserLogger class, which is a subclass of Logger that handles converting LogRecord objects to UserLogRecord objects for you.

Note that it is perfectly acceptable for one of these objects to find its way to any other type of Handler object; other handlers will log these objects the same way they would log any other LogRecord object.