You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
3.0KB

  1. {
  2. "Logging": {
  3. "LogLevel": {
  4. "Default": "Information",
  5. "Microsoft": "Warning",
  6. "Microsoft.Hosting.Lifetime": "Information",
  7. "System.Net.Http.HttpClient": "Warning"
  8. }
  9. },
  10. "Serilog": {
  11. "Using": [ "Serilog.Sinks.File", "Serilog.Sinks.Async", "Serilog.Sinks.Console", "Serilog.Sinks.Exceptionless" ],
  12. "MinimumLevel": {
  13. "Default": "Verbose",
  14. "Override": {
  15. "Microsoft": "Warning",
  16. "Microsoft.Hosting.Lifetime": "Information",
  17. "System.Net.Http.HttpClient": "Warning"
  18. }
  19. },
  20. "WriteTo:Information": {
  21. "Name": "Async",
  22. "Args": {
  23. "Configure": [
  24. {
  25. "Name": "File",
  26. "Args": {
  27. "RestrictedToMinimumLevel": "Information",
  28. "RollingInterval": "Day",
  29. "RollOnFileSizeLimit": "true",
  30. "OutputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss }[{Level:u3}] [Thread-{ThreadId}] [{SourceContext:l}] {Message:lj}{NewLine}{Exception}",
  31. "Path": "/var/telpo_pushthird_ssl/logs/infos/info.log",
  32. "RetainedFileCountLimit": 7 // "--设置日志文件个数最大值,默认31,意思就是只保留最近的31个日志文件", "等于null时永远保留文件": null
  33. // "FileSizeLimitBytes": 20971520, //设置单个文件大小为3M 默认1G
  34. // "RollOnFileSizeLimit": true //超过文件大小后创建新的
  35. }
  36. }
  37. ]
  38. }
  39. },
  40. "WriteTo:Error": {
  41. "Name": "Async",
  42. "Args": {
  43. "Configure": [
  44. {
  45. "Name": "File",
  46. "Args": {
  47. "RestrictedToMinimumLevel": "Error",
  48. "RollingInterval": "Day",
  49. "RollOnFileSizeLimit": "true",
  50. "OutputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss }[{Level:u3}] [Thread-{ThreadId}][{SourceContext:l}] {Message:lj}{NewLine}{Exception}",
  51. "Path": "/var/telpo_pushthird_ssl/logs/errors/error.log",
  52. "RetainedFileCountLimit": 7 // "--设置日志文件个数最大值,默认31,意思就是只保留最近的31个日志文件", "等于null时永远保留文件": null
  53. // "FileSizeLimitBytes": 20971520, //设置单个文件大小为3M 默认1G
  54. // "RollOnFileSizeLimit": true //超过文件大小后创建新的
  55. }
  56. }
  57. ]
  58. }
  59. },
  60. "WriteTo:Console": {
  61. "Name": "Console",
  62. "Args": {
  63. "restrictedToMinimumLevel": "Verbose",
  64. "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss }[{Level:u3}] [Thread-{ThreadId}] [{SourceContext:l}] {Message:lj}{NewLine}{Exception}",
  65. "theme": "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Code, Serilog.Sinks.Console"
  66. }
  67. },
  68. "WriteTo:Exceptionless": {
  69. "Name": "Exceptionless",
  70. "Args": {
  71. "serverUrl": "http://8.134.157.154:5000",
  72. "apiKey": "f2I0sng4BBQS9IAsbdBK1W71oOYGPpsC66s7pzJu"
  73. }
  74. }
  75. }
  76. }