Search Results for

    Show / Hide Table of Contents

    Using the SeriLog Logging Extension

    To make use of this extension, ensure you have referenced the package from NuGet and add the UseSeriLogLogging() line to your Runtime builder.

    IRuntime runtime = new RuntimeFactory()
                 .UseSeriLogLogging()
                 .GetRuntimeInstance(new RuntimeOptions
                 {
                     Version = "stable",
                     UUID = "your-uuid",
                     LicenseKey = "your-license-key"
                 });
    

    Configuring SeriLog

    The SeriLog logging extension will convert the standard .NET adapter log configuration file to SeriLog config settings as it initializes SeriLog.

    It also uses some extra configuration items that determine the output format of log messages, fileoutputTemplate & consoleOutputTemplate.

    These both use SeriLogs own format description language.

    They currently defaulted to the following:

    fileoutputTemplate

    {Timestamp:u} [{Level:u3}] ({SourceContext,-50} : {ThreadId,-2}) - {Message}{NewLine}{Exception}
    

    consoleOutputTemplate

    ({SourceContext,-50} : {ThreadId,-2}) - {Message}{NewLine}{Exception}
    
    In This Article
    Back to top Copyright OpenFin