close

>>-close--------------------------------><

Closes an open event log. If no log is open, this method does nothing.

Arguments:

There are no arguments.

Return value:

This method returns 0 on success. If there is an error closing the event log the operating system error code is returned. An error is highly unlikely.

Example:

The following code snippet opens the default event log (the Application log,) displays some information about the log, then closes the open log.


log = .WindowsEventLog~new

ret = log~open
if ret == 0 then do
  say "  Total records:     " log~getNumber
  say "  First record number" log~getFirst
  say "  Last record number " log~getLast
  say "  Log is full?       " log~isFull
  log~close
end

/* Output might be:

  Total records:      1827
  First record number 1
  Last record number  1827
  Log is full?        0

/*