Seq Documentation and Support

Seq Documentation and Support

Welcome to the Seq documentation hub. You'll find comprehensive guides and documentation to help you start working with Seq as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Ask A Question

Questions

3

Dynamic Logging Levels + Web.config transformations -- is this approach correct?

Hi all, My goal is to: * Have a base Serilog config (Web.config) which uses no API key and has a debug level of information. * Have transforms (e.g. Web.Stage.config) which may / may not supply & API key, and which defer to Seq on logging levels (but also supply a default in the config). My current base `Web.config` reads: ``` <!-- Serilog / Seq Logging Configuration --> <add key="serilog:minimum-level" value="Debug" /> <!-- Logging Levels: Verbose, Debug, Information, Warning, Error --> <add key="serilog:using:Seq" value="Serilog.Sinks.Seq" /> <add key="serilog:write-to:Seq.serverUrl" value="http://localhost:5341" /> <add key="serilog:write-to:Seq.apiKey" value="" /> ``` My example test transformation includes the API key & server (redacted): ``` <add key="serilog:minimum-level" value="Information" xdt:Locator="Match(key)" xdt:Transform="SetAttributes(value)" /> <add key="serilog:write-to:Seq.serverUrl" value="http://[Redacted]:5341" xdt:Locator="Match(key)" xdt:Transform="SetAttributes(value)" /> <add key="serilog:write-to:Seq.apiKey" value="[Redacted]" xdt:Locator="Match(key)" xdt:Transform="SetAttributes(value)" /> ``` In an Autofac module, I have: ``` private ILogger WireUpSerilog() { var levelSwitch = new LoggingLevelSwitch(); var envName = ConfigurationManager.AppSettings["Environment"]; var logger = new LoggerConfiguration() .ReadFrom.AppSettings() .MinimumLevel.ControlledBy(levelSwitch) .Enrich.WithProperty("Environment", envName) .Enrich.WithEnvironmentUserName() .Enrich.WithMachineName() .CreateLogger(); Log.Logger = logger; return logger; } ``` which is then wired up as: ``` builder.Register(c => WireUpSerilog()).As<ILogger>().InstancePerLifetimeScope(); ``` Is this sufficient to enable dynamic logging levels via API keys? Or is there anything I'm missing here? Do I need to specify the use of LoggingLevelSwitch in the config itself? Just making sure.

Posted by Sean Killeen about a year ago

1

Version Store out of memory error

I am getting tons of errors in the ingestion log like below: I've been running seq fine for months. I recently noticed that Seq was dropping some of my log messages, so I started experimenting with the DurableSeq sink, but not sure if that has anything to do with it. Now it doesn't look like my Seq instance can ingest any events. Any ideas on how to remedy? I am running Seq 3.4.20 on Win Server 2016 and I have plenty of free disk space. Thanks. 2017-04-13 17:50:17 Exception raised when writing to event storage Microsoft.Isam.Esent.Interop.EsentVersionStoreOutOfMemoryException: Version store out of memory (cleanup already attempted) at Microsoft.Isam.Esent.Interop.Api.Check(Int32 err) at Microsoft.Isam.Esent.Interop.Api.JetGetTableColumnInfo(JET_SESID sesid, JET_TABLEID tableid, String columnName, JET_COLUMNLIST& columnlist) at Microsoft.Isam.Esent.Interop.Api.GetColumnDictionary(JET_SESID sesid, JET_TABLEID tableid) at Seq.Storage.Isam.SeqDBSession.OpenTable(String tableName, Table& table, IDictionary`2& columns) at Seq.Storage.Isam.EventStoreExtent..ctor(SeqDBSession session) at Seq.Storage.Events.EventStore.Add(StorageEventCreationData[] eventsCreationData, Boolean lazyFlush) at Seq.Server.Web.Api.Events.RawEventsModule.Ingest() 2017-04-13 17:50:21 Exception raised when writing to event storage Microsoft.Isam.Esent.Interop.EsentVersionStoreOutOfMemoryException: Version store out of memory (cleanup already attempted) at Microsoft.Isam.Esent.Interop.Api.Check(Int32 err) at Microsoft.Isam.Esent.Interop.Api.JetGetTableColumnInfo(JET_SESID sesid, JET_TABLEID tableid, String columnName, JET_COLUMNLIST& columnlist) at Microsoft.Isam.Esent.Interop.Api.GetColumnDictionary(JET_SESID sesid, JET_TABLEID tableid) at Seq.Storage.Isam.SeqDBSession.OpenTable(String tableName, Table& table, IDictionary`2& columns) at Seq.Storage.Isam.EventStoreExtent..ctor(SeqDBSession session) at Seq.Storage.Events.EventStore.Add(StorageEventCreationData[] eventsCreationData, Boolean lazyFlush) at Seq.Server.Web.Api.Events.RawEventsModule.Ingest()

Posted by Nicholas P. Nelson about a year ago