getNumber

>>--getNumber(--+---------+-+----------+--)----------------------><
                +--server-+ +-,-source-+

Determines the number of records in the event log.

Arguments:

The arguments are:

server

Optional. The server where the event log resides.

source

Optional. The event source.

Return value:

On success, the count of event records in the log. On error, the return is the negated system error code.

Example:

This example opens the system log on the Osprey server. It then checks that there are at least 10 records before reading the log:


  log = .WindowsEventLog~new
  log~open("\\Osprey", "System")
  if log~getNumber > 10 then do
    log~readRecords
    say 'Read' log~events~items 'records.'
  end

::requires 'winSystm.cls'