initialer commit mit kleinem prototype

This commit is contained in:
2026-03-24 18:21:50 +01:00
commit 89b8072e01
3 changed files with 29 additions and 0 deletions

18
LogFramework.psm1 Normal file
View File

@@ -0,0 +1,18 @@
function Write-LFLog {
param(
[string]$Message,
[ValidateSet("low","mid","high","critical")]
[string]$Severity = "low"
)
switch ($Severity) {
"low" { $color = "Gray" }
"mid" { $color = "Cyan" }
"high" { $color = "Yellow" }
"critical" { $color = "Red" }
}
Write-Host "[$Severity] $Message" -ForegroundColor $color
}
Export-ModuleMember -Function Write-LFLog

8
main.ps1 Normal file
View File

@@ -0,0 +1,8 @@
# import von log-framework
Import-Module .\LogFramework.psm1
# ausführen von verschiedenen testcases
Write-LFLog "Testnachricht" "low"
Write-LFLog "Testnachricht" "mid"
Write-LFLog "Testnachricht" "high"
Write-LFLog "Testnachricht" "critical"

3
readme.md Normal file
View File

@@ -0,0 +1,3 @@
# PowerShell Log Framework
A small PowerShell Log Framework will be created here