UserLogger class

This class is used in combination with AgentryHandler to route messages to the user-specific log files on the Agentry Server.

Syntax

public class UserLogger extends Logger

Members

All members of UserLogger, including inherited members.

Methods
Modifier and Type Method Description
public User getUser() Returns the user that this logger is logging for.
public static UserLogger getUserLogger(String, User) Returns an instance of UserLogger that uses the named Logger instance to log messages to the Agentry server for the given user.
public static UserLogger getUserLogger(String, String, User) Returns an instance of UserLogger that uses the named Logger instance to log messages to the Agentry server for the given user.
public void log(LogRecord)  

Usage

It acts as a child logger of an existing Logger object. When its log methods are called, it creates log records of the class UserLogRecord instead of LogRecord, and then passes those log records to its parent logger. If these log records eventually find their way to an AgentryHandler instance, that instance will know to route the messages to user-specific logs on the Agentry server, if those logs are enabled via the AgentryLogging.ini file.