Logging
What is logging
Logging is the process of recording important information or events in a system or application. It helps to keep a record of what's happening, such as errors, warnings, or specific actions, for troubleshooting and analysis purposes. Logs provide valuable insights into the behavior of the system, helping developers and administrators understand and resolve issues more effectively.
Log types
Log Type | Description | When to Use |
---|---|---|
Normal | General log messages without any specific level | Use for regular information or updates that don't require special attention |
Info | Informational messages | Use to provide additional details or context about a specific event |
Warning | Indication of potential issues or unexpected behavior | Use when there are non-critical issues or situations that need attention |
Error | Indicates critical errors or failures | Use to log errors that impact the normal operation of the system |
Please note that the suggested use cases provided here are mere recommendations, and the actual usage of log types may vary based on your personal preferences and specific requirements.
Colors
If you want to improve the appearance of your log messages, you can use different color codes to highlight important parts or organize them better.
Color codes can be added before the relevant text, like ~r~
, to apply a specific color.
You can find a list of all color codes in the table below.
Color code | Screenshot |
---|---|
~k~ | |
~r~ | |
~g~ | |
~b~ | |
~y~ | |
~m~ | |
~c~ | |
~w~ | |
~lk~ | |
~lr~ | |
~lg~ | |
~lb~ | |
~ly~ | |
~lm~ | |
~lc~ | |
~lw~ |