logging.toml 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. # Logging Configuration
  2. [logging]
  3. # all logs can be commented out to disable them if you want yk, because you probably dont need more than the combined log
  4. request_log = "./logs/request.log"
  5. query_log = "./logs/queries.log"
  6. error_log = "./logs/error.log"
  7. warning_log = "./logs/warning.log"
  8. info_log = "./logs/info.log"
  9. combined_log = "./logs/sequel.log"
  10. # Log levels: debug, info, warn, error
  11. level = "info"
  12. # mask fields that are sensitive in logs (they are hashed anyways but why log bcrypt hashes in ur logs thats dumb)
  13. mask_passwords = true
  14. # other values that we might not want in query logs (also applies to request logs)
  15. sensitive_fields = ["login_string", "password_reset_token", "pin_code"]
  16. # Custom log filters, route specific log entries to separate files using regex ... yes I have autism why are you asking?
  17. [[logging.custom_filters]]
  18. name = "security_violations"
  19. output_file = "./logs/security_violations.log"
  20. pattern = "(Permission denied|Too many WHERE|Authentication failed|invalid credentials|invalid PIN|invalid token)"
  21. enabled = true
  22. [[logging.custom_filters]]
  23. name = "admin_transactions"
  24. output_file = "./logs/admin_activity.log"
  25. pattern = "user=admin|power=100"
  26. enabled = true