more event logging fun, clear, oldest, etc

git-svn-id: file:///home/svn/incoming/trunk@2647 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Spoon M 2005-06-14 12:37:17 +00:00
parent b2365e9a72
commit 335c9c3fbb
1 changed files with 37 additions and 0 deletions

View File

@ -138,7 +138,44 @@ class EventLog
end
end
#
# Return the record number of the oldest event (not necessarily 1)
#
def oldest
request = Packet.create_request('stdapi_sys_eventlog_oldest')
request.add_tlv(TLV_TYPE_EVENT_HANDLE, self.handle);
response = client.send_request(request)
return response.get_tlv_value(TLV_TYPE_EVENT_RECORDNUMBER)
end
#
# Clear the specified event log (and return nil).
#--
# I should eventually support BackupFile
#++
def clear
request = Packet.create_request('stdapi_sys_eventlog_clear')
request.add_tlv(TLV_TYPE_EVENT_HANDLE, self.handle);
response = client.send_request(request)
return nil
end
#
# Return the record number of the oldest event (not necessarily 1)
#
def close
request = Packet.create_request('stdapi_sys_eventlog_close')
request.add_tlv(TLV_TYPE_EVENT_HANDLE, self.handle);
response = client.send_request(request)
return nil
end
end
end end end end end end