Comments (4)
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.
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.
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.
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)
- With doesn't work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zap-prettyconsole.