0
0
mirror of https://github.com/Pumpkin-MC/Pumpkin-Website.git synced 2025-02-07 00:19:51 +00:00
Alexander Medvedev 530524b739 init
2024-12-22 19:45:25 +01:00

1.4 KiB

Logging

Pumpkin allows you to customize what you want in your logs.

Configuring Logging

enabled: Boolean

Whether logging is enabled or not.

:::code-group

[logging]
enabled = true

:::

level: Enum

What should be logged. Possible values are:

  • Off
  • Error
  • Warn
  • Info
  • Debug
  • Trace

:::code-group

[logging]
enabled = true
level = "Debug"

:::

env: Boolean

Whether to allow choosing the log level by setting the RUST_LOG environment variable or not.

:::code-group

[logging]
enabled = true
env = true

:::

threads: Boolean

Whether to print threads in the logging message or not.

:::code-group

[logging]
enabled = true
threads = false

:::

color: Boolean

Whether to print with color to the console or not.

:::code-group

[logging]
enabled = true
color = false

:::

timestamp: Boolean

Whether to print the timestamp in the meessage or not.

:::code-group

[logging]
enabled = true
timestamp = false

:::

Default Config

By default, logging is enabled and will print with color, threads, and timestamp at the Info level.

:::code-group

[logging]
enabled = true
level = "Info"
env = false
threads = true
color = true
timestamp = true

:::