PowerShell commandlet for parsing of 1C technological log.
This module includes Get-TechLog cmdlet and Group-TechLog function. Get-TechLog provides single parameter (Path) that's typed of array of strings. This property works like a Path property in Get-Item cmdlet and can include wildcard chars as well. Parsed event (TjEvent class) already contains commonly used properties that can be used without additional parsing actions from user side. All available properties can be found here: TjEvent. Sort-TechLog is a function that can be used for sorting of input collection with no increasing memory (unlike Sort-Object function). Group-TechLog is just a function that can be used for grouping and getting aggregated values (sum, avg, count, min, max) by any numerable property.
Install-Module OneSTools.PS.TechLog- Path - array of paths (can include wildcard chars)
Get-TechLog "C:\techlog\*\*.log"- Property -
TjEventproperty name that will be used for sorting - Top -
TjEventelements quantity should be taken - Descending - Indicates that Sort-TechLog sorts the objects in descending order. The default is ascending order.
Get-TechLog C:\techlog\*\*.log |
Where-Object LastContextLine -NE "" |
Sort-TechLog Duration -Descending -Top 10 |
Select-Object LastContextLine,Duration |
Format-Table -AutoSize- GroupProperty (alias - GP) -
TjEventproperty name that will be used for grouping - AggregationProperty (alias - AP) -
TjEventproperty name that will be used for calculating aggregated values
Get-TechLog C:\techlog\*\*.log |
Group-TechLog -GP EventName -AP Duration |
Format-Table -AutoSize

