[GH-ISSUE #800] Gerbil produces wrongly parsed logs #1640

Closed
opened 2026-04-16 08:22:13 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @narbux on GitHub (May 29, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/800

In the logs of Pangolin I noticed these lines appearing multiple times.

pangolin  | 2025-05-26T18:00:25.353Z [info]: Public key mismatch. Deleting old peer...
pangolin  | 2025-05-26T18:00:25.361Z [info]: Peer deleted successfully: {"0":"P","1":"e","2":"e","3":"r","4":" ","5":"r","6":"e","7":"m","8":"o","9":"v","10":"e","11":"d","12":" ","13":"s","14":"u","15":"c","16":"c","17":"e","18":"s","19":"s","20":"f","21":"u","22":"l","23":"l","24":"y"}
pangolin  | 2025-05-26T18:00:25.367Z [info]: Peer added successfully: {"0":"P","1":"e","2":"e","3":"r","4":" ","5":"a","6":"d","7":"d","8":"e","9":"d","10":" ","11":"s","12":"u","13":"c","14":"c","15":"e","16":"s","17":"s","18":"f","19":"u","20":"l","21":"l","22":"y"}

As you can see the text after 'Peer added/deleted successfully' is rendered as an object...

Which are probably the parsing of response.data.status in this code:
b467d6afa1/server/routers/gerbil/peers.ts (L27)
b467d6afa1/server/routers/gerbil/peers.ts (L47)

Originally created by @narbux on GitHub (May 29, 2025). Original GitHub issue: https://github.com/fosrl/pangolin/issues/800 In the logs of Pangolin I noticed these lines appearing multiple times. ``` pangolin | 2025-05-26T18:00:25.353Z [info]: Public key mismatch. Deleting old peer... pangolin | 2025-05-26T18:00:25.361Z [info]: Peer deleted successfully: {"0":"P","1":"e","2":"e","3":"r","4":" ","5":"r","6":"e","7":"m","8":"o","9":"v","10":"e","11":"d","12":" ","13":"s","14":"u","15":"c","16":"c","17":"e","18":"s","19":"s","20":"f","21":"u","22":"l","23":"l","24":"y"} pangolin | 2025-05-26T18:00:25.367Z [info]: Peer added successfully: {"0":"P","1":"e","2":"e","3":"r","4":" ","5":"a","6":"d","7":"d","8":"e","9":"d","10":" ","11":"s","12":"u","13":"c","14":"c","15":"e","16":"s","17":"s","18":"f","19":"u","20":"l","21":"l","22":"y"} ``` As you can see the text after 'Peer added/deleted successfully' is rendered as an object... Which are probably the parsing of `response.data.status` in this code: https://github.com/fosrl/pangolin/blob/b467d6afa198a4d77d6399d3418382b5081d7eae/server/routers/gerbil/peers.ts#L27 https://github.com/fosrl/pangolin/blob/b467d6afa198a4d77d6399d3418382b5081d7eae/server/routers/gerbil/peers.ts#L47
GiteaMirror added the good first issuenon-critical bug labels 2026-04-16 08:22:13 -05:00
Author
Owner

@oschwartz10612 commented on GitHub (May 30, 2025):

Yeah I have been meaning to fix this for forever. Do you want to tackle it perhaps?

<!-- gh-comment-id:2922478086 --> @oschwartz10612 commented on GitHub (May 30, 2025): Yeah I have been meaning to fix this for forever. Do you want to tackle it perhaps?
Author
Owner

@yadneshx17 commented on GitHub (Feb 19, 2026):

is this open to work with ?

<!-- gh-comment-id:3925434278 --> @yadneshx17 commented on GitHub (Feb 19, 2026): is this open to work with ?
Author
Owner

@oschwartz10612 commented on GitHub (Feb 25, 2026):

@yadneshx17 sure!

<!-- gh-comment-id:3961855051 --> @oschwartz10612 commented on GitHub (Feb 25, 2026): @yadneshx17 sure!
Author
Owner

@LaurenceJJones commented on GitHub (Feb 26, 2026):

Hey just to keep it updated 04ecf41c , the code seems to have moved to structured logging from winston by passing it as an object:

  logger.info(`Exit node request successful:`, {
      method,
      url,
      status: response.data.status
  });
2026-02-26T07:53:08.209Z [info]: Exit node request successful: {"method":"POST","url":"http://gerbil:3003/peer","status":"Peer removed successfully"}

so this can be likely closed?

<!-- gh-comment-id:3964785157 --> @LaurenceJJones commented on GitHub (Feb 26, 2026): Hey just to keep it updated [04ecf41c](https://github.com/fosrl/pangolin/commit/04ecf41c5ac7620415d5eb9e956cde813563803f) , the code seems to have moved to structured logging from winston by passing it as an object: ``` logger.info(`Exit node request successful:`, { method, url, status: response.data.status }); ``` ``` 2026-02-26T07:53:08.209Z [info]: Exit node request successful: {"method":"POST","url":"http://gerbil:3003/peer","status":"Peer removed successfully"} ``` so this can be likely closed?
Author
Owner

@oschwartz10612 commented on GitHub (Feb 26, 2026):

Thanks for checking on this @LaurenceJJones that sound right!

<!-- gh-comment-id:3968551185 --> @oschwartz10612 commented on GitHub (Feb 26, 2026): Thanks for checking on this @LaurenceJJones that sound right!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#1640