C# 日志库 Serilog

码农软件 · 软件分类 · 日志工具(Logging) · 2019-09-20 09:43:48

软件介绍

Serilog 是一个结构化的 C# 日志库。支持从配置初始化,

            Log.Logger = new LoggerConfiguration()
                .ReadFrom.AppSettings()
                .CreateLogger();

配置文件如下:

    <add key="serilog:minimum-level" value="Verbose" />
    <add key="serilog:write-to:RollingFile.pathFormat" value="D:\Users\TEMP\Robot-{Date}.txt" />
    <add key="serilog:write-to:RollingFile.retainedFileCountLimit" value="10" />

Nuget 安装:

Install-Package Serilog

var position = new { Latitude = 25, Longitude = 134 };
var elapsedMs = 34;

log.Information("Processed {@Position} in {Elapsed:000} ms.", position, elapsedMs);
{"Position": {"Latitude": 25, "Longitude": 134}, "Elapsed": 34}

本文地址:https://www.codercto.com/soft/d/14995.html

Introduction to the Design and Analysis of Algorithms

Introduction to the Design and Analysis of Algorithms

Anany Levitin / Addison Wesley / 2006-2-24 / USD 122.00

Based on a Based on a new classification of algorithm design techniques and a clear delineation of analysis methods, "Introduction to the Design and Analysis of Algorithms" presents the subject in a c......一起来看看 《Introduction to the Design and Analysis of Algorithms》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具