-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
I'd really like to use SEQ as logging target. It fails for every Write-Log command, because there is a problem in serializing the JSON, which I already fixed here: acsdatasystems@c0980fa but haven't merged yet.
With these changes, logs are coming to the SEQ server. But it seems, that there isn't implemented any structured logging. How can I get the original log message?
E.g.
Write-Log -Message "Hello {0}!" -Arguments "PowerShell"in that case I would need Hello {0}! instead of Hello PowerShell!. I would need that, because I have to send a JSON to the server where the message cannot contain the value, but only a key and the value for that key somewhere else.
{
"Events": [
{
"MessageTemplate": "Hello {Who}!",
"Timestamp": "2020-05-29T16:46:09.3034428+02:00",
"Level": null,
"Properties": {
"Who": "World"
}
}
]
}The passed $Log variable doesn't seem to contain such a message template. Is there another way to get the original template?