|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Purpose: Represents the logging strategy used, allowing replaceable logging strategies.
Copyright (c) 2001 Massachusetts Institute of Technology
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
$Source: /cvs/oki/org/okiproject/serviceapi/doc/logging/org/okiproject/serviceapi/logging/Logger.html,v $
Method Summary | |
void |
appendLog(org.okiproject.serviceapi.common.Agent who,
Priority priority,
java.lang.String message)
Workhorse used to append to the log |
void |
debug(org.okiproject.serviceapi.common.Agent who,
java.lang.String message)
Add a debug level message to the log. |
void |
error(org.okiproject.serviceapi.common.Agent who,
java.lang.String message)
Add a error level message to the log. |
void |
fatal(org.okiproject.serviceapi.common.Agent who,
java.lang.String message)
Add a fatal level message to the log. |
Formatter |
getFormatter(org.okiproject.serviceapi.common.Agent who)
Method getFormatter |
void |
info(org.okiproject.serviceapi.common.Agent who,
java.lang.String message)
Add an informational message to the log. |
int |
readLog(org.okiproject.serviceapi.common.Agent who,
byte[] b,
int offset,
int count)
An interface to read the logger. |
java.util.Iterator |
readLog(org.okiproject.serviceapi.common.Agent who,
java.lang.String queryString)
Another interface to read the logger. |
void |
setBasePriority(org.okiproject.serviceapi.common.Agent who,
Priority priority)
This is needed to tell the individual ILoggers what the base priority of the logging service is. |
void |
setFormatter(org.okiproject.serviceapi.common.Agent who,
Formatter formatter)
JavaBean patterns |
void |
start(org.okiproject.serviceapi.common.Agent who)
To open the log |
void |
stop(org.okiproject.serviceapi.common.Agent who)
To close the log |
void |
warning(org.okiproject.serviceapi.common.Agent who,
java.lang.String message)
Add a warning level message to the log. |
Method Detail |
public void start(org.okiproject.serviceapi.common.Agent who)
public void stop(org.okiproject.serviceapi.common.Agent who)
public void appendLog(org.okiproject.serviceapi.common.Agent who, Priority priority, java.lang.String message)
public void setBasePriority(org.okiproject.serviceapi.common.Agent who, Priority priority)
who
- Represents the Agent state for authn/authz purposes.priority
- IPriority representing the logging service's base priority.public void warning(org.okiproject.serviceapi.common.Agent who, java.lang.String message)
public void info(org.okiproject.serviceapi.common.Agent who, java.lang.String message)
public void debug(org.okiproject.serviceapi.common.Agent who, java.lang.String message)
public void error(org.okiproject.serviceapi.common.Agent who, java.lang.String message)
public void fatal(org.okiproject.serviceapi.common.Agent who, java.lang.String message)
public int readLog(org.okiproject.serviceapi.common.Agent who, byte[] b, int offset, int count) throws java.lang.Exception
who
- Represents the Agent state for authn/authz purposes.b
- Destination array.offset
- count
- # of bytes to read.java.lang.Exception
- if any I/O or other error occurs. Semantic errors
include trying to read handle that cannot be read from, such as stderr,
stdout.public java.util.Iterator readLog(org.okiproject.serviceapi.common.Agent who, java.lang.String queryString) throws java.lang.Exception
who
- Represents the Agent state for authn/authz purposes.queryString
- Represents tag(s) to look for in the messagejava.lang.Exception
- if any I/O or other error occurs.public void setFormatter(org.okiproject.serviceapi.common.Agent who, Formatter formatter)
public Formatter getFormatter(org.okiproject.serviceapi.common.Agent who)
who
-
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |