Merge branch 'sigar-1.6'
This commit is contained in:
commit
818de4a64c
|
@ -25,6 +25,8 @@ import java.util.Date;
|
|||
*/
|
||||
public class EventLogRecord {
|
||||
|
||||
private static final String NA = "N/A";
|
||||
|
||||
long recordNumber;
|
||||
long timeGenerated;
|
||||
long timeWritten;
|
||||
|
@ -159,6 +161,13 @@ public class EventLogRecord {
|
|||
return this.user;
|
||||
}
|
||||
|
||||
private String getUserString() {
|
||||
if (this.user == null) {
|
||||
return NA;
|
||||
}
|
||||
return this.user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message for the event.
|
||||
*/
|
||||
|
@ -179,10 +188,13 @@ public class EventLogRecord {
|
|||
public String toString()
|
||||
{
|
||||
return
|
||||
"[" + new Date(getTimeGenerated() * 1000) + "] " +
|
||||
"[" + getEventTypeString() + "] " +
|
||||
"[" + new Date(getTimeGenerated() * 1000) + "] " +
|
||||
"[" + getSource() + "] " +
|
||||
"[" + getCategoryString() + "] " +
|
||||
"[" + (getEventId() & 0xFFFF) + "] " +
|
||||
"[" + getUserString() + "] " +
|
||||
"[" + getComputerName() + "] " +
|
||||
getMessage();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue