1
0
mirror of https://github.com/akpaevj/OneSTools.PS.TechLog.git synced 2025-10-06 21:56:52 +02:00
2022-06-10 10:48:58 +03:00
2022-04-21 14:42:31 +03:00
2022-03-30 15:40:36 +03:00
2022-03-23 16:07:42 +03:00
2022-03-23 16:07:42 +03:00
2022-03-23 16:07:42 +03:00
2022-03-23 16:07:42 +03:00
2022-03-23 16:07:42 +03:00
2022-03-23 16:07:42 +03:00
2022-04-05 20:16:52 +03:00
2022-06-10 10:48:58 +03:00
2022-04-05 20:16:52 +03:00
2022-04-05 20:16:52 +03:00

OneSTools.PS.TechLog

PowerShell Gallery Version

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.

Installation

Install-Module OneSTools.PS.TechLog

Get-TechLog

Properties

  • Path - array of paths (can include wildcard chars)

Example:

Get-TechLog "C:\techlog\*\*.log"

Sort-TechLog

Properties

  • Property - TjEvent property name that will be used for sorting
  • Top - TjEvent elements quantity should be taken
  • Descending - Indicates that Sort-TechLog sorts the objects in descending order. The default is ascending order.

Example:

Get-TechLog C:\techlog\*\*.log | 
Where-Object LastContextLine -NE "" | 
Sort-TechLog Duration -Descending -Top 10 | 
Select-Object LastContextLine,Duration | 
Format-Table -AutoSize

Output:

Sort-TechLog

Group-TechLog

Properties

  • GroupProperty (alias - GP) - TjEvent property name that will be used for grouping
  • AggregationProperty (alias - AP) - TjEvent property name that will be used for calculating aggregated values

Example:

Get-TechLog C:\techlog\*\*.log | 
Group-TechLog -GP EventName -AP Duration | 
Format-Table -AutoSize

Output:

Group-TechLog

Output (not-formatted):

Group-TechLog

Description
PowerShell commandlet for parsing of 1C technological log
Readme MIT 298 KiB
Languages
C# 90.8%
PowerShell 9.2%