Skip to content

A Serilog sink that writes events to a Postgresql database in a json format using Marten

License

Notifications You must be signed in to change notification settings

mdissel/serilog-sinks-marten

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

serilog-sinks-marten

A Serilog sink that writes events to Postgresql using Marten

Register in the documentstore or create your own mapping for the type LogMessage

documentStore = m.DocumentStore.For(_ =>
{
  ..
  _.MappingForSerilog();
  ..
});

Create the sink for serilog

Log.Logger = new LoggerConfiguration()
  .WriteTo.Marten(
    documentStore, 
    false
   )
  .CreateLogger();

Done!

About

A Serilog sink that writes events to a Postgresql database in a json format using Marten

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages