That’s my question, when using Write-PSULog to write a log to the DB, does it write using async or sync?
If it isn’t using the Serilog async option, can it be added as a configuration option so it can write async? I would like to replace a home grown logger with Write-PSULog but for performance we need it to write asynchronously to the DB (SQL Server). We produce a huge amount of logs (parallel in many threads) and synchronous writes wouldn’t work in our case. Before I start down the road of retrofitting to test performance figured I should ask first.
@adam One more question related to logging… Are we able to specify a custom table location for logging or are we locked to LogEntry inside of the PSU database (in SQL Server)? We use an AG and keep the logging database out of it as to not impact performance. We need to keep PSU in the AG though, so being able to write to another table would be huge. Thanks!
That said, there currently isn’t a way to specify a different table name or custom columns. It is feasible to add both of those. Serilog has customization for both those items and we would just need to expose them through the target properties.
After playing with it I found you have to create the table first before it will write to it. I didn’t see any errors anywhere, even with the logging configuration saved with no errors, it continued to write to the original table\database until I created the table in the new database. Simple, just not clear through the documentation.
I’ll get a request on the issues board for custom columns and a custom table name. Thanks again!