forked from SignalR/SignalR
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a script to analyze logs and included it in the build
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
param([Parameter(Mandatory=$true)][string]$LogPath) | ||
|
||
function Get-FileName($line) | ||
{ | ||
$index = $_.IndexOf("log:"); | ||
return $_.Substring(0, $index) + "log" | ||
} | ||
|
||
New-Item $LogPath\LogAnalysis -type directory -force | ||
|
||
# UnobservedTask exceptions | ||
gci -recurse $LogPath\*.log | select-string "unobserved" | group Filename | select Name | out-string -width 1000 > $LogPath\LogAnalysis\unobserved_exceptions.log | ||
|
||
# ObjectDisposed exceptions | ||
gci -recurse $LogPath\*.log | select-string "disposed" | group Filename | select Name | out-string -width 1000 > $LogPath\LogAnalysis\ode_exceptions.log | ||
|
||
# Network errors exceptions | ||
gci -recurse $LogPath\*.log | select-string "unexpected" | group Filename | select Name | out-string -width 1000 > $LogPath\LogAnalysis\unexpected.log | ||
|
||
# Connection Forcibly closed Errors | ||
gci -recurse $LogPath\*.log | select-string "An existing connection was forcibly closed" | group Filename | select Name | out-string -width 1000 > $LogPath\LogAnalysis\connection_closed.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters