You can use the following PowerShell commands to remove them. Note that Exception Stack traces will still be there, use \s instead of \t if your really want to get rid of them.
Get-Content CrmTraceFile.log | Select-String "^[\t]" -NotMatch | Out-File -Width 256 newlogfile.logYou could do it for all files in the trace directory like this, which should be used as a script:
$files = ls
foreach ($file in $files){
$name = [string]::Format("p_{0}",$file.Name)
$filepath = [string]::Format("{0}\{1}", $file.DirectoryName,$file.Name)
get-content -Path $filepath | select-string "^[\t]" -notmatch | out-file $name -width 256
}
No comments:
Post a Comment