Community module to create and manage log files
- Log during script runtime
- Performance aspects to keep in mind
- High volume of write to disk
- Support for multiple write at the same time to same file (add retries too ?)
Please vote and submit your ideas in issues.
- Test Driven Development (build Pester tests first)
- Use PowerShell Classes
- 2 commands:
- Write Log (used to write in a new or existing log file)
- Rotate Log (used to delete old logs, specified by a specific date or number of days)
- Support Pipeline
- Support Windows PowerShell/PSCore
- Support Windows/Linux
- Support for different timezone, UTC by default
- Log format support: CSV
- File name Format:
- Default:
<scriptname><delimiter><datetime><delimiter>.log
- Example:
- Default:
- Log line Format
- Default:
<datetime><delimiter><messagetype><delimiter><source><delimiter><message>
- Example:
- Default:
- Logs should be parsable
- Support for Header and Footer parameter
- Handle when file is currently in use
- Log format: XML, JSON
- Ship log to EventLog
- Email Log
- Summarize log performance
- How long the log ran
- How long each steps ran
- Log parser
- LICENSE file: MIT
- CHANGELOG file
- CONTRIBUTIONS file
- Azure DevOps CI/CD
- Modules: InvokeBuild, BuildHelpers, PSdepend, PSDeploy
- Tasks: build, test, clean, deploy, analyze
- Write-LogMessage
- Rotate-LogMessage
- Support for Credential
- Support for PSDrive
- Fork the repository
- Clone locally
- Run
build.ps1 -InstallDependencies
- NOTE: You need to do this only the first time
- Run
build.ps1 -task clean,build,test
each time you modify the code
# Assuming you have a fork and did a git clone locally
# Navigate to your local copy
# Make sure you don't have pending changes (push them first if its the case)
# Add the remote source repo here we call it "upstream"
git remote add upstream https://github.com/FrPSUG/LogManagement.git
# retrieve the changes from upstream
git fetch upstream
# updating your fork from original repo to keep up with their changes
git pull upstream master
# to push the code to your fork:
git push