src/sample/XXX.API/config.json/serilog.json

(完整代码) 1KB

//日志相关配置 Information  Error
{
  "Logging": {
    "LogLevel": {
      "Default": "Debug",
      "Microsoft": "Debug",
      "Microsoft.Hosting.Lifetime": "Debug"
    }
  },
  "Serilog": {
    "MinimumLevel": {
      "Default": "Debug",
      "Override": {
        "Default": "Information",
        "Microsoft": "Information",
        "System": "Information",
        "System.Net.Http.HttpClient": "Information",
        "Microsoft.Hosting.Lifetime": "Information"
      }
    },
    "WriteTo:Async": {
      "Name": "Async",
      "Args": {
        "configure": [
          {
            "Name": "Console"
          }
          //,{
          //  "Name": "File",
          //  "Args": {
          //    "path": "Logs/.txt",
          //    "rollingInterval": "Day",
          //    "retainedFileCountLimit": "31", //Number of retained files by default 31
          //    "retainedFileTimeLimit": "10.00:00:00", //Deletes files older than 10 days
          //    "outputTemplate": "{Timestamp:o} [{Level:u3}] ({Application}/{MachineName}/{ThreadId}) {Message}{NewLine}{Exception}"
          //  }
          //},          
          //{
          //  "Name": "Elasticsearch",
          //  "Args": {
          //    "nodeUris": "http://elasticsearch.com:9200",
          //    "indexFormat": "xxxapi-{0:yyyy.MM}",
          //    "autoRegisterTemplate": true,
          //    "connectionGlobalHeaders": "Authorization=ApiKey XzVPaDFIOEJNNUduR1FGWFdiWlc6Sms5ajFUNHJTWDJ5VzEtOG4zSllsdw=="
          //  }
          //}
        ]
      }
    },
    "Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ],
    "Properties": {
      "Application": "XXX"
    }
  }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。