|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.log.TWGLogMsg
A class which gives a structure for passing a log message to a TWGLogListener callback method.
Field Summary | |
---|---|
protected long |
category
|
protected int |
correlator
|
protected int |
level
|
protected java.lang.String |
text
|
protected java.util.Date |
timeStamp
|
Constructor Summary | |
---|---|
protected |
TWGLogMsg()
|
|
TWGLogMsg(byte[] buf)
|
|
TWGLogMsg(long Category,
int Level,
int Correlator,
int time_t,
short msec,
java.lang.String Text)
Constructor for creating a log message. |
|
TWGLogMsg(java.io.RandomAccessFile fin)
|
|
TWGLogMsg(TWGByteArrayInputStr sin,
java.util.Locale loc,
java.util.Properties defs)
|
Method Summary | |
---|---|
static void |
addResourceBundle(java.lang.String bundleName,
java.util.ResourceBundle bundle)
|
long |
category()
Get this message's category. |
static boolean |
checkLocation(java.io.RandomAccessFile fin,
long offset,
long time)
|
int |
correlator()
Get the message's correlator value. |
int |
level()
Get this message's level. |
void |
readTWGByteArray(TWGByteArrayInputStr sin)
|
static void |
setDateFormat(java.text.DateFormat newDateFormat)
|
static void |
setDateFormat(java.lang.String pattern,
java.util.Locale loc)
|
static void |
setDefaultDateFormat()
|
java.lang.String |
text()
Get this message's text. |
java.util.Date |
timeStamp()
Get this message's timestamp. |
byte[] |
toByteArray()
|
byte[] |
toByteArray(boolean prepend4)
|
java.lang.String |
toString()
Turn this log message into a string |
void |
writeToFile(java.io.RandomAccessFile raf)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected long category
protected int level
protected int correlator
protected java.util.Date timeStamp
protected java.lang.String text
Constructor Detail |
protected TWGLogMsg()
public TWGLogMsg(long Category, int Level, int Correlator, int time_t, short msec, java.lang.String Text)
Category
- The category of the log message. The category is specific to
each log.
Note: for RAS logs, the message type is one of the
component contents defined in TWGRas.javaLevel
- The level of severity/detail for the message.
The lower the number the more severe/more general the message.
By setting the logs level to a lower number, less severe or
more detailed messages can be filtered out.
Note: for RAS logs, the level actuall represents the
RAS message type identified by one of the constants in TWGRas.java.Correlator
- A value used to link together messages that are related to
a single event. Use zero if this field is not significant.time_t
- The number of seconds since 1-1-70 (i.e. time() from the C run-time library).msec
- The milliseconds part of the timestamp.Text
- The message's text.public TWGLogMsg(java.io.RandomAccessFile fin) throws java.io.IOException
public TWGLogMsg(TWGByteArrayInputStr sin, java.util.Locale loc, java.util.Properties defs) throws java.io.UTFDataFormatException
public TWGLogMsg(byte[] buf) throws java.io.UTFDataFormatException
Method Detail |
public static boolean checkLocation(java.io.RandomAccessFile fin, long offset, long time)
public void readTWGByteArray(TWGByteArrayInputStr sin) throws java.io.UTFDataFormatException
java.io.UTFDataFormatException
public final long category()
public final int level()
public final int correlator()
public final java.util.Date timeStamp()
public final java.lang.String text()
public java.lang.String toString()
public byte[] toByteArray()
public byte[] toByteArray(boolean prepend4)
public void writeToFile(java.io.RandomAccessFile raf) throws java.io.IOException
java.io.IOException
public static void setDefaultDateFormat()
public static void setDateFormat(java.lang.String pattern, java.util.Locale loc)
public static void setDateFormat(java.text.DateFormat newDateFormat)
public static void addResourceBundle(java.lang.String bundleName, java.util.ResourceBundle bundle)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |