mirror of
https://github.com/aurc/loggo.git
synced 2026-04-26 08:25:56 +03:00
[GH-ISSUE #29] Possible to create a template that mixes json and text log output? #8
Labels
No labels
need more info
need more info
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/loggo#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @iTerminate on GitHub (Nov 20, 2025).
Original GitHub issue: https://github.com/aurc/loggo/issues/29
Great utility! I use it to parse json output out of mosquitto_sub. The issue is I want to display the topic as well. Here is a sample output from
mosuitto_sub:app/add {"description":"Add action completed","entityName":"Item","entityId":252}Is it possible to create a template that will extract the json and the topic that precedes the json message?
@iTerminate commented on GitHub (Nov 20, 2025):
I found a solution using
sedmosquitto_sub -v -t "app/#" | sed -u 's/^\([^ ]*\) {\(.*\)}/{"topic":"\1",\2}/' | loggo streamThis converts the output to full json