logging.json 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. {
  2. "version": 1,
  3. "disable_existing_loggers": false,
  4. "formatters": {
  5. "standard": {
  6. "format": "%(asctime)s [%(name)s:%(lineno)d] [%(module)s:%(funcName)s] [%(levelname)s]- %(message)s"
  7. },
  8. "api": {
  9. "format": "%(asctime)s - %(levelname)s - %(message)s"
  10. }
  11. },
  12. "filters": {},
  13. "handlers": {
  14. "default": {
  15. "class": "logging.handlers.RotatingFileHandler",
  16. "level": "INFO",
  17. "formatter": "standard",
  18. "filename": "./logs/info.log",
  19. "maxBytes": 10485760,
  20. "backupCount": 20,
  21. "encoding": "utf8"
  22. },
  23. "console": {
  24. "class": "logging.StreamHandler",
  25. "level": "DEBUG",
  26. "formatter": "standard"
  27. },
  28. "error_file_handler": {
  29. "class": "logging.handlers.RotatingFileHandler",
  30. "level": "ERROR",
  31. "formatter": "standard",
  32. "filename": "./logs/errors.log",
  33. "maxBytes": 10485760,
  34. "backupCount": 20,
  35. "encoding": "utf8"
  36. },
  37. "debug_file_handler": {
  38. "class": "logging.handlers.RotatingFileHandler",
  39. "level": "DEBUG",
  40. "filename": "./logs/debug.log",
  41. "maxBytes": 10485760,
  42. "backupCount": 5,
  43. "formatter": "standard",
  44. "encoding": "utf8"
  45. },
  46. "api_file_handler": {
  47. "class": "logging.handlers.RotatingFileHandler",
  48. "level": "INFO",
  49. "filename": "./logs/api.log",
  50. "maxBytes": 10485760,
  51. "backupCount": 5,
  52. "formatter": "api"
  53. }
  54. },
  55. "loggers": {
  56. "multipart.multipart":{
  57. "level": "WARNING",
  58. "propagate": false
  59. },
  60. "uvicorn.access": {
  61. "handlers": [
  62. "api_file_handler"
  63. ]
  64. },
  65. "mne": {
  66. "level": "ERROR"
  67. },
  68. "matplotlib": {
  69. "level": "ERROR"
  70. },
  71. "PIL.PngImagePlugin": {
  72. "level": "ERROR"
  73. },
  74. "core.gait_analysis": {
  75. "handlers": [
  76. "default",
  77. "console"
  78. ],
  79. "level": "INFO",
  80. "propagate": false
  81. },
  82. "core.facial_expression": {
  83. "handlers": [
  84. "default",
  85. "error_file_handler",
  86. "debug_file_handler",
  87. "console"
  88. ],
  89. "level": "INFO",
  90. "propagate": false
  91. },
  92. "core.posture": {
  93. "handlers": [
  94. "default",
  95. "error_file_handler",
  96. "debug_file_handler",
  97. "console"
  98. ],
  99. "level": "INFO",
  100. "propagate": false
  101. },
  102. "core.utils": {
  103. "handlers": [
  104. "default",
  105. "error_file_handler",
  106. "debug_file_handler",
  107. "console"
  108. ],
  109. "level": "INFO",
  110. "propagate": false
  111. },
  112. "core.sig_chain.device.pony": {
  113. "handlers": [
  114. "default",
  115. "error_file_handler",
  116. "debug_file_handler"
  117. ],
  118. "level": "INFO",
  119. "propagate": false
  120. }
  121. },
  122. "root":{
  123. "handlers": [
  124. "default",
  125. "error_file_handler",
  126. "debug_file_handler",
  127. "console"
  128. ],
  129. "level": "DEBUG"
  130. }
  131. }