appsettings.json 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. {
  2. "Serilog": {
  3. "Using": [
  4. "Serilog.Enrichers.Span",
  5. "Serilog.Sinks.Console",
  6. "Serilog.Sinks.Grafana.Loki"
  7. ],
  8. "MinimumLevel": {
  9. "Default": "Information",
  10. "Override": {
  11. "Microsoft": "Warning",
  12. "Microsoft.Hosting.Lifetime": "Information",
  13. "Microsoft.AspNetCore.Authentication": "Debug",
  14. "Microsoft.AspNetCore": "Warning",
  15. "Microsoft.AspNetCore.SignalR": "Debug",
  16. "Microsoft.AspNetCore.Http.Connections": "Debug",
  17. "System": "Warning"
  18. }
  19. },
  20. "WriteTo": [
  21. {
  22. "Name": "Console",
  23. "Args": {
  24. //"outputTemplate": "time=\"{Timestamp:yyyy-MM-dd HH:mm:ss}\" level={Level:w3} category={SourceContext} trace={TraceId}{NewLine}msg=\"{Message:lj}\"{NewLine}error=\"{Exception}\"{NewLine}",
  25. "outputTemplate": "[{Timestamp:HH:mm:ss} {Level}] {SourceContext} [{TraceId}]{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}",
  26. "theme": "Serilog.Sinks.SystemConsole.Themes.ConsoleTheme::None, Serilog.Sinks.Console"
  27. }
  28. },
  29. {
  30. "Name": "GrafanaLoki",
  31. "Args": {
  32. "outputTemplate": "[{Timestamp:HH:mm:ss} {Level}] {SourceContext} [{TraceId}]{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}",
  33. "uri": "http://192.168.100.217:3100",
  34. "labels": [
  35. {
  36. "key": "app",
  37. "value": "hotline"
  38. }
  39. ],
  40. "propertiesAsLabels": [
  41. "fwhl"
  42. ]
  43. }
  44. }
  45. //{
  46. // "Name": "Exeptionless",
  47. // "Args": {
  48. // //"outputTemplate": "time=\"{Timestamp:yyyy-MM-dd HH:mm:ss}\" level={Level:w3} category={SourceContext} trace={TraceId}{NewLine}msg=\"{Message:lj}\"{NewLine}error=\"{Exception}\"{NewLine}",
  49. // "outputTemplate": "[{Timestamp:HH:mm:ss} {Level}] {SourceContext} [{TraceId}]{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}",
  50. // "theme": "Serilog.Sinks.SystemConsole.Themes.ConsoleTheme::None, Serilog.Sinks.Console"
  51. // }
  52. //}
  53. //{
  54. // "Name": "File",
  55. // "Args": {
  56. // "path": "logs/log-.txt",
  57. // "rollingInterval": "Day"
  58. // }
  59. //},
  60. //{
  61. // "Name": "MongoDBBson",
  62. // "Args": {
  63. // "databaseUrl": "mongodb://192.168.100.121:27017/hotline_logs",
  64. // "collectionName": "logs",
  65. // "cappedMaxSizeMb": "1024",
  66. // "cappedMaxDocuments": "50000",
  67. // "rollingInterval": "Day",
  68. // "outputTemplate": "[{Timestamp:HH:mm:ss} {Level}] {SourceContext} [{TraceId}]{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}"
  69. // }
  70. //}
  71. ],
  72. "Enrich": [ "FromLogContext", "WithSpan" ]
  73. },
  74. "AllowedHosts": "*",
  75. "DeviceConfigs": {
  76. "Address": "http://192.168.100.100/xml",
  77. "Authorize": true,
  78. "ReceiveKey": "E1BBD1BB-A269-44",
  79. "SendKey": "2A-BA92-160A3B1D",
  80. "Expired": 1440 //认证过期时间(秒)
  81. },
  82. "ConnectionStrings": {
  83. "Hotline": " PORT=5432;DATABASE=hotline;HOST=192.168.100.121;PASSWORD=fengwo11!!;USER ID=dev;",
  84. "Redis": "192.168.100.223:6379",
  85. "MongoDB": "mongodb://192.168.100.121:27017"
  86. },
  87. "Swagger": true,
  88. "Cors": {
  89. "Origins": [ "http://localhost:8888", "http://admin.hotline.fw.com", "http://hotline.fw.com" ]
  90. },
  91. "Exceptionless": {
  92. "InUse": false,
  93. "ServerUrl": "http://log.fw.com",
  94. "ApiKey": "zrSsxjdFC1Uv2WBckZn3RYxjpKKdxfYAN50aFiuV"
  95. },
  96. "IdentityConfigs": {
  97. "IdentityUrl": "http://identity.fengwo.com",
  98. "IdentityApiUrl": "http://open.identity.fengwo.com",
  99. "ClientId": "hotline_server",
  100. "ClientSecret": "ce2fae0e-f0f6-46d6-bd79-1f1a31dff494",
  101. "ClientScope": "identity_admin_api"
  102. },
  103. "IdentityConfiguration": {
  104. "Password": {
  105. "RequiredLength": 8,
  106. "RequireNonAlphanumeric": true,
  107. "RequireLowercase": true,
  108. "RequireUppercase": true
  109. },
  110. "User": {
  111. "RequireUniqueEmail": false
  112. },
  113. "SignIn": {
  114. "RequireConfirmedAccount": false
  115. },
  116. "Lockout": {
  117. "MaxFailedAccessAttempts": 5,
  118. "DefaultLockoutTimeSpan": "00:10:00"
  119. },
  120. "Account": {
  121. "DefaultPassword": "Fwkj@789"
  122. },
  123. "Jwt": {
  124. "SecretKey": "e660d04ef1d3410798c953f5d7b8a4e1",
  125. "Issuer": "hotline_server",
  126. "Audience": "hotline",
  127. "Scope": "hotline_api",
  128. "Expired": 86400 //seceonds
  129. }
  130. },
  131. "DatabaseConfiguration": {
  132. "ApplyDbMigrations": false,
  133. "ApplySeed": false
  134. }
  135. }