Git Product home page Git Product logo

Comments (4)

thessem avatar thessem commented on May 31, 2024

This is an interesting feature request. Thank you. I am a little limited by needing to work through the zap type interfaces (e.g., their zap.String() method doesn't accept arguments) but I may be able to get something working through zap.Interface(prettyconsole.StringBlock(yourString)) or similar.

Heads up, I've just started a new job and I don't have a huge amount of spare time at the moment, but soon I will be using this library for work again, and I'll definitely have the mental capacity to hone this on my weekends.

from zap-prettyconsole.

thessem avatar thessem commented on May 31, 2024

Perhaps the prettylogger could take configuration of a list of "safe" keys and run addIndentedString on those keys instead, which would make the strings output similarly to the error outputs.

from zap-prettyconsole.

tombh avatar tombh commented on May 31, 2024

Just a quick message to say thank you for the replies. I'm wanting to look into this myself too, see if I could come up with a rough PR or something. I've got my day job as well, so it's on my list 😁

That's a good point about having a list of safe keys. In my case, I'd be happy to see all occurrences of \n and \t expanded. I imagine the idea behind whitelisting is that often is preferable to have the condensed log lines to save screen space?

from zap-prettyconsole.

thessem avatar thessem commented on May 31, 2024

Added in 0922045, and released in v0.4.0. Check out Readme for usage and a visual of how it looks.

from zap-prettyconsole.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.