From f853acddd485aa6dcc1f3075403fcdad1d0795af Mon Sep 17 00:00:00 2001 From: Abhishek Nanda Date: Mon, 8 Apr 2013 16:39:22 -0700 Subject: [PATCH] Added a script to analyze logs and included it in the build --- build/AnalyzeLogs.ps1 | 21 +++++++++++++++++++++ build/Build.proj | 4 ++++ 2 files changed, 25 insertions(+) create mode 100644 build/AnalyzeLogs.ps1 diff --git a/build/AnalyzeLogs.ps1 b/build/AnalyzeLogs.ps1 new file mode 100644 index 0000000000..c954dbefbb --- /dev/null +++ b/build/AnalyzeLogs.ps1 @@ -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 \ No newline at end of file diff --git a/build/Build.proj b/build/Build.proj index 53035fe89a..5c55300837 100644 --- a/build/Build.proj +++ b/build/Build.proj @@ -152,6 +152,10 @@ Condition=" '$(OS)' == 'Windows_NT'"/> + + + +