• .net core appsettings 配置 serilog


    "Serilog": {
    "MinimumLevel": {
    "Default": "Debug",
    "Override": {
    "Microsoft": "Fatal",
    "System": "Fatal"
    }
    },
    "WriteTo": [
    {
    "Name": "RollingFile",
    "Args": {
    "pathFormat": "logs/{Date}.log",
    "outputTemplate": "{Timestamp:HH:mm:ss} [{Level:u3}] {Message:lj}{NewLine}{Exception}",
    "shared": true,
    "restrictedToMinimumLevel": "Debug"
    }
    },
    {
    "Name": "MSSqlServer",
    "Args": {
    "connectionString": "server=.;database=Qujiang_201905301637;uid=qujiang1;pwd=qujiang1;",
    "tableName": "SeriLogs",
    "autoCreateSqlTable": true,
    "restrictedToMinimumLevel": "Warning",
    "batchPostingLimit": 1000,
    "columnOptionsSection": {
    //"disableTriggers": true,
    //"clusteredColumnstoreIndex": false,
    //"primaryKeyColumnName": "Id",
    //"addStandardColumns": [ "LogEvent" ],
    "removeStandardColumns": [ "MessageTemplate", "Properties" ],
    //"additionalColumns": [
    // {
    // "ColumnName": "EventType",
    // "DataType": "int",
    // "AllowNull": false
    // },
    // {
    // "ColumnName": "Release",
    // "DataType": "varchar",
    // "DataLength": 32
    // },
    // {
    // "ColumnName": "All_SqlColumn_Defaults",
    // "DataType": "varchar",
    // "AllowNull": true,
    // "DataLength": -1,
    // "NonClusteredIndex": false
    // }
    //],
    "id": { "nonClusteredIndex": true },
    "level": {
    "columnName": "Severity",
    "storeAsEnum": false
    },
    //"properties": {
    // "columnName": "Properties",
    // "excludeAdditionalProperties": true,
    // "dictionaryElementName": "dict",
    // "itemElementName": "item",
    // "omitDictionaryContainerElement": false,
    // "omitSequenceContainerElement": false,
    // "omitStructureContainerElement": false,
    // "omitElementIfEmpty": true,
    // "propertyElementName": "prop",
    // "rootElementName": "root",
    // "sequenceElementName": "seq",
    // "structureElementName": "struct",
    // "usePropertyKeyAsElementName": false
    //},
    //"timeStamp": {
    // "columnName": "Timestamp",
    // "convertToUtc": true
    //},
    //"logEvent": {
    // "excludeAdditionalProperties": true,
    // "excludeStandardColumns": true
    //},
    "message": { "columnName": "Msg" },
    "exception": { "columnName": "Ex" },
    "messageTemplate": { "columnName": "Template" }
    }
    }
    }
    ]
    }

  • 相关阅读:
    【笔记】DLHLP
    【笔记】DLHLP
    【笔记】DLHLP
    【笔记】DLHLP
    【笔记】PyTorch框架学习 -- 2. 计算图、autograd以及逻辑回归的实现
    【笔记】PyTorch框架学习 -- 1. 张量创建及操作,线性回归的实现
    【安装指南】pytorch相关软件安装
    【笔记】机器学习
    【笔记】机器学习
    【笔记】机器学习
  • 原文地址:https://www.cnblogs.com/lovewl2/p/11248949.html
Copyright © 2020-2023  润新知