Logging.json 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {
  2. "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
  3. "Logging": {
  4. "LogLevel": {
  5. "Default": "Information",
  6. "Microsoft.AspNetCore": "Warning",
  7. "Microsoft.EntityFrameworkCore": "Information",
  8. "AspNetCoreRateLimit": "None"
  9. },
  10. "File": {
  11. "Enabled": false, // 启用文件日志
  12. "FileName": "logs/{0:yyyyMMdd}_{1}.log", // 日志文件
  13. "Append": true, // 追加覆盖
  14. // "MinimumLevel": "Information", // 日志级别
  15. "FileSizeLimitBytes": 10485760, // 10M=10*1024*1024
  16. "MaxRollingFiles": 30 // 只保留30个文件
  17. },
  18. "Database": {
  19. "Enabled": true, // 启用数据库日志
  20. "MinimumLevel": "Information"
  21. },
  22. "ElasticSearch": {
  23. "Enabled": false, // 启用ES日志
  24. "AuthType": "Basic", // ES认证类型,可选 Basic、ApiKey、Base64ApiKey
  25. "User": "admin", // Basic认证的用户名,使用Basic认证类型时必填
  26. "Password": "123456", // Basic认证的密码,使用Basic认证类型时必填
  27. "ApiId": "", // 使用ApiKey认证类型时必填
  28. "ApiKey": "", // 使用ApiKey认证类型时必填
  29. "Base64ApiKey": "TmtrOEszNEJuQ0NyaWlydGtROFk6SG1RZ0w3YzBTc2lCanJTYlV3aXNzZw==", // 使用Base64ApiKey认证类型时必填
  30. "Fingerprint": "37:08:6A:C6:06:CC:9A:43:CF:ED:25:A2:1C:A4:69:57:90:31:2C:06:CA:61:56:39:6A:9C:46:11:BD:22:51:DA", // ES使用Https时的证书指纹
  31. "ServerUris": [ "http://192.168.1.100:9200" ], // 地址
  32. "DefaultIndex": "adminnet" // 索引
  33. },
  34. "Monitor": {
  35. "GlobalEnabled": true, // 启用全局拦截日志
  36. "IncludeOfMethods": [], // 拦截特定方法,当GlobalEnabled=false有效
  37. "ExcludeOfMethods": [], // 排除特定方法,当GlobalEnabled=true有效
  38. "BahLogLevel": "Information", // Oops.Oh 和 Oops.Bah 业务日志输出级别
  39. "WithReturnValue": true, // 是否包含返回值,默认true
  40. "ReturnValueThreshold": 500, // 返回值字符串阈值,默认0全量输出
  41. "JsonBehavior": "None", // 是否输出Json,默认None(OnlyJson、All)
  42. "JsonIndented": false, // 是否格式化Json
  43. "UseUtcTimestamp": false, // 时间格式UTC、LOCAL
  44. "ConsoleLog": true // 是否显示控制台日志
  45. }
  46. }
  47. }