Src/Entry/LoggerEntryTrimmed.psm1

1
2
3
4
5
6
7
8
9
10
11
12
using module ..\ILogger.psm1

class LoggerEntryTrimmed: ILoggerEntry
{
    static [ILoggerEntry]yield([String]$text)
    {
        return [ILoggerEntry]@{
            severity = [LoggingEventType]::((Get-PSCallStack)[$true].functionName)
            message = $text.trim()
        }
    }
}