|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.iplanet.portalserver.logging.LogManager
This class provides the logging access methods for applications so that the applications can create, retrieve, submit, delete log information. It also provides a method to access a list of log names that have been created in the system by all the applications.
| Field Summary | |
static java.lang.String |
DBDRIVER
log database driver |
static java.lang.String |
DBPASS
log database pass |
static java.lang.String |
DBUSER
log database user |
static java.lang.String |
LOCATION
log location |
static java.lang.String |
MAXFILESIZE
log maximum file size, with minimum 100,000 bytes |
static java.lang.String |
NUMHISTORYFILE
number of history log |
static java.lang.String |
READSIZE
log read size, with minimum 3,000 bytes |
static java.lang.String |
STATUS
log status |
static java.lang.String |
TYPE
log type, ie, plain text or JDBC |
| Constructor Summary | |
LogManager(Session sess)
|
|
LogManager(SessionID sid)
|
|
LogManager(SessionID sid,
java.lang.String server)
|
|
LogManager(Session sess,
java.lang.String server)
|
|
| Method Summary | |
void |
create(java.lang.String logName)
Create a log in the logging directory. |
void |
delete(java.lang.String logName)
Delete a log from the system. |
java.util.Hashtable |
getLogAttrs(java.lang.String logName)
Get log attributes from a log. |
java.util.Vector |
list()
Get all the existing logs (history segments not included) from the system. |
java.util.Vector |
list(java.lang.String logName)
Obtain a specific log segment list. |
java.util.Vector |
read(java.lang.String logName)
Read log strings from a log. |
java.util.Vector |
read(java.lang.String logName,
java.lang.String query)
Retrieve log strings from a log with a query. |
java.util.List |
readLogRecord(java.lang.String logName)
Read log records from a log. |
java.util.List |
readLogRecord(java.lang.String logName,
java.lang.String query)
Retrieve log records from a log with a query. |
void |
setLogAttrs(java.lang.String logName,
java.util.Hashtable logattrs)
Set log attributes for a log. |
void |
write(LogRecord lr,
java.lang.String logName)
Write a log record (key-value pair) information to a log. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final java.lang.String STATUS
public static final java.lang.String MAXFILESIZE
public static final java.lang.String LOCATION
public static final java.lang.String NUMHISTORYFILE
public static final java.lang.String TYPE
public static final java.lang.String DBDRIVER
public static final java.lang.String DBUSER
public static final java.lang.String DBPASS
public static final java.lang.String READSIZE
| Constructor Detail |
public LogManager(Session sess)
public LogManager(SessionID sid)
public LogManager(Session sess,
java.lang.String server)
public LogManager(SessionID sid,
java.lang.String server)
| Method Detail |
public void create(java.lang.String logName)
throws LogException
logName - A log to be created. A valid logName should not contain any "-".
public void write(LogRecord lr,
java.lang.String logName)
throws LogException
logName - A log to which the application wants to submit a log record.
It should be an valid and existing log name.lr - A log record which contains key-value pair text message needed
to be logged.
public java.util.Vector read(java.lang.String logName,
java.lang.String query)
throws LogException
logName - A log from which the log information are retrieved. It
should be valid and existing log name.query - A query string.
The keywords available to search on are "type", "domain", "loginid"
"data" and "time".
For the flat file based logging, one can give simple queries as follows:
"time >= 2000/01/20";
"domain = sun.com";
"loginid = root";
"type = iwtAdmin";
if one is using DB logging, then one can give more complicated queries
as the query string just gets used as the where criteria for the
log read SQL.
a few example query strings for Database logging might be
"time > '2000/12/03 12:23:00 PST'"
"loginid = 'root'"
"domain like 'sun.com' and time > '2000/12/03 12:23:00 PST'"
and other forms of SQL where clauses.
public java.util.Vector read(java.lang.String logName)
throws LogException
logName - A log from which the log string are retrieved. It
should be valid and existing log name.
public java.util.List readLogRecord(java.lang.String logName)
throws LogException
logName - A log from which the log records are retrieved. It
should be valid and existing log name.
public java.util.List readLogRecord(java.lang.String logName,
java.lang.String query)
throws LogException
logName - A log from which the log records are retrieved. It
should be valid and existing log name.query - A query string.
The keywords available to search on are "type", "domain", "loginid"
"data" and "time".
For the flat file based logging, one can give simple queries as follows:
"time >= 2000/01/20";
"domain = sun.com";
"loginid = root";
"type = iwtAdmin";
If one is using DB logging, then one can give more complicated queries
as the query string just gets used as the where criteria for the
log read SQL.
a few example query strings for Database logging might be
"time > '2000/12/03 12:23:00 PST'"
"loginid = 'root'"
"domain like 'sun.com' and time > '2000/12/03 12:23:00 PST'"
and other forms of SQL where clauses.
public void delete(java.lang.String logName)
throws LogException
logName - A log to be deleted. logName should be a valid
and existing log name.
public java.util.Vector list()
throws LogException
None. -
public java.util.Vector list(java.lang.String logName)
throws LogException
logName - A log name. It should be a valid and existing log name.
public java.util.Hashtable getLogAttrs(java.lang.String logName)
throws LogException
logName - A log from which the attributes are retrieved.
public void setLogAttrs(java.lang.String logName,
java.util.Hashtable logattrs)
throws LogException
logName - A log to which the log attributes are set.logattrs - A hashtable contains the following valid log attributes
that can be passed in the Hashtable:
Status ("ACTIVE" or "INACTIVE", "ACTIVE" is the default value);
Max file size ("1000000" is the default value);
Location ("/var/opt/SUNWwt/logs" is the default value);
Number of history file ("3" is the default value);
Logging type ("FILE" or "JDBC", and "FILE" is the default);
Size of log reading ("100000" is the default value);
Database user name;
Database driver name ("oracle.jdbc.driver.OracleDriver" is the default).
Database password;
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||