rename EventLogRecord.getStringData() to getMessage()
This commit is contained in:
parent
80fa6f52eb
commit
67f3334250
@ -237,13 +237,13 @@ JNIEXPORT jobject SIGAR_JNI(win32_EventLog_readlog)
|
|||||||
if ((get_messagefile_dll(name, source, dllfile) == ERROR_SUCCESS) &&
|
if ((get_messagefile_dll(name, source, dllfile) == ERROR_SUCCESS) &&
|
||||||
(get_formatted_message(pevlr, dllfile, msg) == ERROR_SUCCESS))
|
(get_formatted_message(pevlr, dllfile, msg) == ERROR_SUCCESS))
|
||||||
{
|
{
|
||||||
id = JENV->GetFieldID(env, cls, "stringData",
|
id = JENV->GetFieldID(env, cls, "message",
|
||||||
"Ljava/lang/String;");
|
"Ljava/lang/String;");
|
||||||
SetStringField(env, eventObj, id, msg);
|
SetStringField(env, eventObj, id, msg);
|
||||||
} else if (pevlr->StringOffset > 0) {
|
} else if (pevlr->StringOffset > 0) {
|
||||||
/* Work around some applications not using a message file */
|
/* Work around some applications not using a message file */
|
||||||
char *tmp = (LPSTR)((LPBYTE)pevlr + pevlr->StringOffset);
|
char *tmp = (LPSTR)((LPBYTE)pevlr + pevlr->StringOffset);
|
||||||
id = JENV->GetFieldID(env, cls, "stringData", "Ljava/lang/String;");
|
id = JENV->GetFieldID(env, cls, "message", "Ljava/lang/String;");
|
||||||
SetStringField(env, eventObj, id, tmp);
|
SetStringField(env, eventObj, id, tmp);
|
||||||
}
|
}
|
||||||
JENV->ReleaseStringUTFChars(env, jname, name);
|
JENV->ReleaseStringUTFChars(env, jname, name);
|
||||||
|
@ -15,7 +15,7 @@ public class EventLogRecord {
|
|||||||
String source;
|
String source;
|
||||||
String computerName;
|
String computerName;
|
||||||
String user;
|
String user;
|
||||||
String stringData;
|
String message;
|
||||||
|
|
||||||
/* Get the record number for this event entry */
|
/* Get the record number for this event entry */
|
||||||
public long getRecordNumber() {
|
public long getRecordNumber() {
|
||||||
@ -84,10 +84,17 @@ public class EventLogRecord {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the string data for the event. (The message)
|
* Get the message for the event.
|
||||||
|
*/
|
||||||
|
public String getMessage() {
|
||||||
|
return this.message;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
public String getStringData() {
|
public String getStringData() {
|
||||||
return this.stringData;
|
return getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,7 +107,7 @@ public class EventLogRecord {
|
|||||||
"source=" + source + " " +
|
"source=" + source + " " +
|
||||||
"computerName=" + computerName + " " +
|
"computerName=" + computerName + " " +
|
||||||
"user=" + user + " " +
|
"user=" + user + " " +
|
||||||
"stringData=" + stringData;
|
"message=" + message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user