-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
📝 [Proposal]: Force color logging #3400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord |
@yorickdewid Are you running the container with a tty? I run mine with a tty and colors show up |
I have no control over the Kubernetes settings on DigitalOcean's platform, but colors are supported |
@yorickdewid It's a field in your deployment/pod yaml, not in k8s cluster. Like this: apiVersion: v1
kind: Pod
metadata:
name: busybox
spec:
containers:
- name: shell
image: busybox:1.28
command: ["sleep", "3600"]
tty: true |
Yeah I get what you're saying but apps are deployed automatically using Heroku tools. This is DigitalOcean's App Platform. There is nothing to configure. The app platform is built on top of Kubernetes, but thats abstracted away from the user. Many cloud providers offer similar services. |
@ReneWerner87 @efectn Thoughts? |
Such a config option would be ok for me. |
@yorickdewid Target branch is |
I am OK with the change, too. |
Feature Proposal Description
Current
At the moment logging with colors is enabled by default (
enableColors=true
). If certain criteria are met the logger stream is set toNewNonColorable(...)
, and no color is used in the log output. One of these tests is to see if a TTY terminal is connectedisatty.IsTerminal(os.Stdout.Fd())
but there are cases which do support colored output without being connected to a TTY terminal. Examples of these scenarios are:Proposal
Either drop the terminal check or introduce a new config option
forceColors
to enable colors either way.If either one is accepted I will submit a PR
Alignment with Express API
N/A
HTTP RFC Standards Compliance
N/A
API Stability
N/A
Feature Examples
Checklist:
The text was updated successfully, but these errors were encountered: