https://github.com/MSAdministrator/PSLogging
A PowerShell Logging Module that uses Classes to log to the console, log file, or the event viewer
https://github.com/MSAdministrator/PSLogging
Last synced: 3 months ago
JSON representation
A PowerShell Logging Module that uses Classes to log to the console, log file, or the event viewer
- Host: GitHub
- URL: https://github.com/MSAdministrator/PSLogging
- Owner: MSAdministrator
- License: mit
- Created: 2017-06-04T01:10:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-13T16:31:13.000Z (over 6 years ago)
- Last Synced: 2024-05-23T00:34:40.922Z (9 months ago)
- Language: PowerShell
- Size: 42 KB
- Stars: 13
- Watchers: 6
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- jimsghstars - MSAdministrator/PSLogging - A PowerShell Logging Module that uses Classes to log to the console, log file, or the event viewer (PowerShell)
README
# PSLogging
A PowerShell V5 class that can log to:
+ A File
+ The console
+ The Windows Event Viewer## Synopsis
Used to create and output information from functions to a specific (or all three) log types+ A File
+ The console
+ The Windows Event Viewer## Description
This function will write to a all or one log type. Each log type can have a specified log type of:```
Informational (Info)
Success (Success)
Warning (Warning)
Debugging (Debug)
Error (Error)
Error (Error & ErrorRecord)
```This Class can be used directly by loading the 'PSLogging.ps1' file in the 'Class' folder or by using one of the functions contained in the 'Public' folder.
+ [New-EventViewerClass](docs/New-EventViewerClass.md)
+ [New-LogFileClass](docs/New-LogFileClass.md)
+ [New-WriteHostClass](docs/New-WriteHostClass.md)## Using PSLogging Class's directly
As mentioned previously, there are multiple classes contained within the PSLogging.ps1 file. These are listed below, as well as their individual documentation pages:+ [EventViewer](docs/EventViewer.md)
+ [LogFile](docs/LogFile.md)
+ [WriteHost](docs/WriteHost.md)## Notes
```yaml
Name: Write-LogEntry
Created by: Josh Rickard
Created Date: 04/01/2017
```
## Functionality
Write-LogEntry is a PowerShell helper function that will accept or create a log file and add strings based on severity, as well as parse $error[0] records for easy interpretation and readability.