question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Winston colors don't work with docker

See original GitHub issue

If you run winston in container (in my case boot2docker OSX), colors get lost. This doesn’t happen with debug npm library e.g.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tarwichcommented, May 21, 2015

…and fixed

passing --color=always to my program fixes this issue. The issue is not with Winston, but with Marak/colors.

That being said, Winston could enable the option with

var colors = require("colors");
if(somethingSaysIShouldColor)
    colors.enabled = true;

If I write a program and manually set require("colors").enabled = true, then it enables the colors for my (non-TTY) program, but not for included programs like Winston.

enabled option found here

0reactions
indexzerocommented, Nov 18, 2015

Fixed in #751. Released in winston@2.1.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Winston won't log in color - Stack Overflow
Everything is white. I've been Googling for hours. I'm running Ubuntu 17. // Logging with Winston const os = require ...
Read more >
ECS Logging with Winston | ECS Logging Node.js Reference
This Node.js package provides a formatter for the winston logger, compatible with Elastic Common Schema (ECS) logging. In combination with the Filebeat ...
Read more >
Color output controls - Docker Documentation
Learn how to control the color of BuildKit progress output.
Read more >
Let's Dockerize a Node.js Express App - Bits and Pieces
Create a docker image and deploy your Node application in 3-steps. ... steps out of the way, it is finally time to configure...
Read more >
How to manage your Docker Logs with ELK and Fluentd
I'm not going to delve too deeply into how all of these components work, as that is outside of the scope of this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found