Skip to content

Commit

Permalink
uglify the logs
Browse files Browse the repository at this point in the history
So, it turns out js-ipfs-api is relying on the fact that go-ipfs spits out
ndjson event logs. Furthermore, it turns out that ndjson is just generally
easier to parse. Therefore, while pretty logs are pretty, I think it's best to
leave this up to the client.
  • Loading branch information
Stebalien committed Oct 31, 2018
1 parent 4040da7 commit c768e5d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion log.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ func (el *eventLogger) Event(ctx context.Context, event string, metadata ...Logg
var buf bytes.Buffer
encoder := json.NewEncoder(&buf)
encoder.SetEscapeHTML(false)
encoder.SetIndent("", " ")
err = encoder.Encode(accum)
if err != nil {
el.Errorf("ERROR FORMATTING EVENT ENTRY: %s", err)
Expand Down
1 change: 0 additions & 1 deletion tracer/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ func (r *LoggableSpanRecorder) RecordSpan(span RawSpan) {
var buf bytes.Buffer
encoder := json.NewEncoder(&buf)
encoder.SetEscapeHTML(false)
encoder.SetIndent("", " ")
err := encoder.Encode(spanlog)
if err != nil {
fmt.Fprintf(os.Stderr, "ERROR FORMATTING SPAN ENTRY: %s\n", err)
Expand Down

0 comments on commit c768e5d

Please sign in to comment.