How to setting up Serilog Sink in Identify

We supported a new log store, it is Serilog Sink (ref: There are many Serilog targets, we can find out it here but we just support MSSqlSever so far.

  • To use that log store, we need to change the log target into system setup/logging section to
  • Create a new database in SQL Server, in this example, I created database name: IdentifyLog
  • Add the following keys to web.config of Admin/Runtime (replace the username/password to the correct ones for connection string):

    <add key="serilog:using:MSSqlSever" value="Serilog.Sinks.MSSqlServer" />
    <add key="serilog:write-to:MSSqlServer.connectionString" value="Data Source=.;Initial Catalog=IdentifyLog;User ID=sa;Password=Test!234;"/>
    <add key="serilog:write-to:MSSqlServer.tableName" value="Logs"/>
    <add key="serilog:write-to:MSSqlServer.autoCreateSqlTable" value="true"/>

  • Copy Serilog.Sinks.MSSqlServer.dll and Serilog.Sinks.PeriodicBatching.dll assemblies to admin/bin, runtime/bin folder. Link download: here
  • Restart IIS