{"repo":"SladkyCitron/slogcolor","free":true,"listed":false,"github":"https://github.com/SladkyCitron/slogcolor","clone":"git clone https://github.com/SladkyCitron/slogcolor.git","description":"Color handler for log/slog","language":"Go","stars":29,"topics":["ansi-colors","color","go","go-slog","golang","golang-slog","log","logger","logging","slog"],"license":"MIT","category":"analytics","readme_excerpt":"🌈 slogcolor slogcolor is a little, customizable color handler for log/slog . It enhances log readability by color-coding log levels and supports flexible formatting options. Its output is inspired by XMRig and zerolog. Installation Run: Basic Usage Default options slogcolor provides a set of predefined options to simplify configuration. You can use these default options via DefaultOptions , or simply pass nil for the same effect. The behavior is identical in both cases, so you can choose based on your coding style or preference. Customized output format The output format can also be customized using the Options like this: or like this: Prefixes Prefixes can be useful for adding context to log messages, such as identifying different subsystems or components (e.g., DB , SceneController , Network ) that generated the log. Messages can be prefixed with Prefix like this: It can also be used as an alias for ease of use, especially when you frequently use prefixes, like this: Disable colors Colors are enabled by default but can be disabled using Options.NoColor . Particularly useful for automatically enabling colors based on the terminal capabilities using e.g. the go-isatty package. License Licensed under the MIT License (see LICENSE)","default_branch":null,"files":null,"tree":[],"storefront":"/r/SladkyCitron","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/SladkyCitron/slogcolor/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}