Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
noodlog
🍜 Parametrized JSON logging library in Golang which lets you obfuscate sensitive data and marshal any kind of content.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
TL; DR I created Go logger zlog that prevent outputting secret values to the log. https://github.com/m-mizutani/zlog
One tool that addresses this issue is an OSS called blouson. It has a function to hide the values of field names with secure_ prefix in Ruby on Rails and the corresponding values from SQL statements included in Exceptions. Since I have been developing exclusively in Go recently, I wanted to use a tool with a similar function in Go.
Some famous existing libraries that support structured logging are zap, logrus, zerolog, but none of them implement such a function to hide the secret value.
Some famous existing libraries that support structured logging are zap, logrus, zerolog, but none of them implement such a function to hide the secret value.
For example, github.com/gyozatech/noodlog provides a similar function, but it assumes conversion to JSON, and type information is lost in the output stage. Since zlog basically performs hiding while preserving the types, you can freely choose the format of the final output.
Related posts
- go-coffeeshop - A practical coffee shop application event-driven microservices built with Golang
- My opinionated way to write and test a go http server
- Boost Your Medium Visibility: 12 Essential Tips for Writers
- Get Random Images API for free from Lorem Picsum
- Now Anyone Can Add Beautiful Interactive Images in ChatGPT ⏱️ (in 30 Seconds)