appsettings.json 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {
  2. "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
  3. "Urls": "https://*:5005",
  4. "Logging": {
  5. "LogLevel": {
  6. "Default": "Information",
  7. "Microsoft": "Warning",
  8. "Microsoft.Hosting.Lifetime": "Information"
  9. },
  10. "File": {
  11. "Enabled": true, // 启用文件日志
  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": false, // 启用数据库日志
  20. "MinimumLevel": "Information"
  21. },
  22. "ElasticSearch": {
  23. "Enabled": false, // 启用ES日志
  24. "ServerUris": [ "http://dilon:123456@192.168.1.100:9200" ], // 地址
  25. "DefaultIndex": "adminnet" // 索引
  26. },
  27. "Monitor": {
  28. "GlobalEnabled": true, // 启用全局拦截日志
  29. "IncludeOfMethods": [], // 拦截特定方法,当GlobalEnabled=false有效
  30. "ExcludeOfMethods": [], // 排除特定方法,当GlobalEnabled=true有效
  31. "BahLogLevel": "Information", // Oops.Oh 和 Oops.Bah 业务日志输出级别
  32. "WithReturnValue": true, // 配置是否包含返回值,默认true
  33. "ReturnValueThreshold": 0 // 配置返回值字符串阈值,默认0全量输出
  34. }
  35. },
  36. "AllowedHosts": "*"
  37. }