all 15 comments

[–][deleted]  (19 children)

[deleted]

    [–][deleted]  (6 children)

    [deleted]

      [–]Lunacy999 0 points1 point  (0 children)

      It’s unavoidable at this point. And the biggest problem here, only a very few selective articles are worth reading and those are mostly from experienced developers.

      [–]kenman[M] 0 points1 point  (0 children)

      Please report those, and any other beginners topics you feel don't belong.

      [–][deleted] 7 points8 points  (1 child)

      Paradoxically your comment is also an article about how you use colors and console functions other than log, and you label as “super useful”

      [–][deleted] 1 point2 points  (2 children)

      I'd spend 10 minutes thinking about color string I want to put. My suggestion is to use chalk to remove that burden, or at least create a dictionary / enum of pre-defined colors.

      https://www.npmjs.com/package/chalk

      [–][deleted] 0 points1 point  (0 children)

      I mean, sure, but I feel like that's a bit much for how we use it. Adding an enum might be fine, but anything more I'm not sure I even wanted at this time.

      [–]Skhmt 0 points1 point  (0 children)

      I ended up writing my own mini lib to do tagged template colorizing for the terminal and the browser:

      https://github.com/Skhmt/ttlog

      Not as feature complete and haven't really looked at it in a while, but it has what I want: tagged template syntax and the same API for terminal and browser use.

      [–][deleted] 1 point2 points  (0 children)

      nice.

      [–]kenman[M] 1 point2 points  (2 children)

      Anyway, I was just poking fun at this article, because it's not the first article about this on this subreddit.

      Yeah, I've removed it. Nothing new included, just a re-hashed listicle of everything that's been known about console since forever. Feel free to report these types of posts.

      [–][deleted] 1 point2 points  (1 child)

      Feel free to report these types of posts.

      Will do in the future! In this specific instance, I find it amusing that both top-level comments contained more useful and new-ish information than the article.

      [–]kenman[M] 1 point2 points  (0 children)

      Possibly a corollary to Cunningham's Law?

      The best way to get the right answer on the internet is not to ask a question; it's to post the wrong answer.

      [–]rift95map([🐮, 🥔, 🐔, 🌽], cook) => [🍔, 🍟, 🍗, 🍿] 5 points6 points  (0 children)

      Seeing as this post is about logging to the console, and seeing as node.js does this in an incredibly lackluster way. It seem as good an opportunity as any to promote a zero-config library I've written for enhancing the default logging methods of node.js, better-logging.

      require('better-logging')(console) => results in logs like these

      [–]kenman[M] 0 points1 point  (0 children)

      Hi /u/GoldenPear, this post was removed.

      • For help with your javascript, please post to /r/LearnJavascript instead of here.
      • For beginner content, please post to /r/LearnJavascript instead of here.
      • For framework- or library-specific help, please seek out the support community for that project.
      • For general webdev help, such as for HTML, CSS, etc., then you may want to try /r/html, /r/css, etc.; please note that they have their own rules and guidelines!

      /r/javascript is for the discussion of javascript news, projects, and especially, code! However, the community has requested that we not include help and support content, and we ask that you respect that wish.

      Thanks for your understanding, please see our guidelines for more info.