log.file.conf.example 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ##--------------------------------------------------------------------
  2. ## Log
  3. ##
  4. ## Configure the log output location, log level, log file storage path, and parameters
  5. ##--------------------------------------------------------------------
  6. ## Note: This is an example of how to configure this feature
  7. ## you should copy and paste the below data into the emqx.conf for working
  8. ## The default-enabled log handler can use all the above fields listed fields
  9. log.file {
  10. ## use false to disable this
  11. enable = true
  12. ## Log level
  13. ## Type: debug | info | notice | warning | error | critical | alert | emergency
  14. level = warning
  15. ## Log formatter, text for free text, and json for structured logging
  16. ## Type: text | json
  17. formatter = text
  18. ## Time offset for formatting the timestamp
  19. ## Type:
  20. ## - system :: local system time
  21. ## - utc :: UTC time
  22. ## - +-[hh]:[mm]: user specified time offset, such as "-02:00" or "+00:00" Defaults to: system
  23. time_offset = system
  24. ## Maximum number of log files
  25. ## Type: Range from 1 to 128
  26. rotation_count = 10
  27. ## This parameter controls log file rotation
  28. ## Type:
  29. ## - infinity :: the log file will grow indefinitely
  30. ## - ByteSize :: the log file will be rotated once it reaches this value in bytes
  31. rotation_size = 50MB
  32. }