https://github.com/heyitsgilbert/log4netparse
A PowerShell module to parse log4net log files.
https://github.com/heyitsgilbert/log4netparse
Last synced: about 1 year ago
JSON representation
A PowerShell module to parse log4net log files.
- Host: GitHub
- URL: https://github.com/heyitsgilbert/log4netparse
- Owner: HeyItsGilbert
- License: mit
- Created: 2023-08-30T22:36:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-03T02:41:02.000Z (about 1 year ago)
- Last Synced: 2025-01-11T08:48:53.094Z (about 1 year ago)
- Language: PowerShell
- Size: 667 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Log4NetParse
A module to parse log4net logs and give back easy to filter objects.




## Overview
This was written to parse logs for tools that write out logs with Log4Net.
Learn more at [log4net](https://logging.apache.org/log4net/)
Note: My use of Log4Net is limited and most the regex for different pattern
names are a complete guess by me. If you are familiar with these, please file
an issue or make a PR.
## Documentation
Docs automatically updated at
[heyitsgilbert.github.io/Log4NetParse](https://heyitsgilbert.github.io/Log4NetParse/)
## Installation
```powershell
Install-Module Log4NetParse
```
## Examples
```powershell
Import-Module Log4NetParse
# Find a regex for your pattern (i.e., useful for use in other tools)
Convert-PatternLayout -PatternLayout '%timestamp [%thread] %level %logger %ndc - %message%newline'
# Parse a log and get set of objects
Read-Log4NetLog -Path 'current.log'
```
The `Read-Log4NetLog` cmdlet will return an object for each thread it finds in a
file. This can be helpful when trying to find the log lines for a particular
execution. This makes it easier to filter on things like start/end time, and
log level.