GithubHelp home page GithubHelp logo

Better terminal logs about protobuf-es HOT 4 CLOSED

ArielGueta avatar ArielGueta commented on June 26, 2024
Better terminal logs

from protobuf-es.

Comments (4)

timostamm avatar timostamm commented on June 26, 2024

Hey Ariel, we're working on a version 2 that doesn't use classes (see pre-release here). This should help you in your case.

Logging the JSON representation still seems like a good idea to me. It really depends on your use case. If you want to redact specific fields from your logs, you'll also be able to use custom options with v2 to implement a filter. For example, you could mark fields that you do not want to show up in logs like this:

syntax = "proto3";

import "google/protobuf/descriptor.proto";

message Person {
  string name = 1;
  int32 id = 2;
  string email = 3 [(redacted) = true]; // don't include in logs
}

// custom field option 
extend google.protobuf.FieldOptions {
  optional bool redacted = 1024;
}

It's a unique feature of Protobuf that can be very useful for cases like this.

from protobuf-es.

ArielGueta avatar ArielGueta commented on June 26, 2024

We are working on a JS sdk based on this. Should we wait for v2?

from protobuf-es.

timostamm avatar timostamm commented on June 26, 2024

You could start using v2 today (the main APIs are fairly stable and feature complete), but you wouldn't want to ship with a dependency on a v2 pre-release version.

We can't commit on a release date yet, but I'd be extremely bummed if we didn't cut a stable release within the next couple of weeks or worst case next couple of months. If you need help with your implementation on v2, please feel free to reach out to us via Slack, we're happy to help.

from protobuf-es.

ArielGueta avatar ArielGueta commented on June 26, 2024

Great, thanks!

from protobuf-es.

Related Issues (20)

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.