add EventLogRecord.getLogName method
This commit is contained in:
parent
6eb5f9db0b
commit
8802b3929b
|
@ -97,7 +97,9 @@ public class EventLog extends Win32 {
|
|||
public EventLogRecord read(int recordOffset)
|
||||
throws Win32Exception {
|
||||
|
||||
return readlog(this.name, recordOffset);
|
||||
EventLogRecord record = readlog(this.name, recordOffset);
|
||||
record.setLogName(this.name);
|
||||
return record;
|
||||
}
|
||||
|
||||
private native EventLogRecord readlog(String name, int recordOffset)
|
||||
|
|
|
@ -34,6 +34,20 @@ public class EventLogRecord {
|
|||
String computerName;
|
||||
String user;
|
||||
String message;
|
||||
String logName;
|
||||
|
||||
EventLogRecord() {}
|
||||
|
||||
/**
|
||||
* @return Event log name which generated the event
|
||||
*/
|
||||
public String getLogName() {
|
||||
return this.logName;
|
||||
}
|
||||
|
||||
void setLogName(String logName) {
|
||||
this.logName = logName;
|
||||
}
|
||||
|
||||
/* Get the record number for this event entry */
|
||||
public long getRecordNumber() {
|
||||
|
|
Loading…
Reference in New Issue