ErrorLogCollector

This class handles the error logs of USOclasses.
The methods of USOClasses have a try-catch code as default.
Default try-catch lines output the error logs in SALAD log folder.

Methods:
ErrorLogCollector.GetLog($keyword)
ErrorLogCollector.Initialize($userid)

Error information format
Name Summary
FileName a file name that error is written in.
Date date string formatted yyyyMMdd.
OnWhat a computer name where error occured.
Who a user name who met the error.
WhatKind invinfo = invocation info / recinfo = error record
DateTimeDetail date time string formatted yyyyMMddHHmmssfffff.
LogData detail of error information.


ex)
# create instance
$e = new ErrorLogCollector;
# initialize
$e = $e.Initialize($env:username);
# get errors that occured today
$dtstr = Get-Date -Format "yyyyMMdd";
$errorlist = $e.GetLog($dtstr);
# check all
$errorlist;
# get the errors that occured on this computer
$mycomputererrors = $errorlist | ?{$_.OnWhat -eq $env:computername};
# show details
$mycomputererrors | %{$_.LogData};

Last edited Mar 2, 2013 at 11:55 AM by Tom__S, version 9

Comments

No comments yet.