Use of --debug not rendering line breaks correctly #567

Open
opened 2024-02-06 10:58:14 +00:00 by basebuilder · 2 comments
Member

In debugging #566 I noticed the stacktraces are not properly rendering \n as line breaks. Below is output

$ abra server add eotl-sites --debug
DEBU[0000] validated eotl-sites as domain argument  caller="/home/decentral1se/work/coop-cloud/abra/cli/internal/validate.go:116 ValidateDomain"
FATA[0007] lookup eotl-sites on 127.0.0.53:53: server misbehaving  caller="/home/decentral1se/work/coop-cloud/abra/cli/server/add.go:154 glob..func1" stack="/home/decentral1se/work/coop-cloud/abra/cli/server/add.go:154              glob..func1\n/home/decentral1se/go/pkg/mod/github.com/urfave/cli@v1.22.9/app.go:524     HandleAction\n/home/decentral1se/go/pkg/mod/github.com/urfave/cli@v1.22.9/command.go:173 Command.Run\n/home/decentral1se/go/pkg/mod/github.com/urfave/cli@v1.22.9/app.go:405     (*App).RunAsSubcommand\n/home/decentral1se/go/pkg/mod/github.com/urfave/cli@v1.22.9/command.go:378 Command.startApp\n/home/decentral1se/go/pkg/mod/github.com/urfave/cli@v1.22.9/command.go:102 Command.Run\n/home/decentral1se/go/pkg/mod/github.com/urfave/cli@v1.22.9/app.go:277     (*App).Run\n/home/decentral1se/work/coop-cloud/abra/cli/cli.go:203                     RunApp\n/home/decentral1se/work/coop-cloud/abra/cmd/abra/main.go:22                main\n/usr/local/go/src/runtime/internal/atomic/types.go:194                     (*Uint32).Load\n/usr/local/go/src/runtime/asm_amd64.s:1650                                 goexit"
In debugging #566 I noticed the stacktraces are not properly rendering `\n` as line breaks. Below is output ``` $ abra server add eotl-sites --debug DEBU[0000] validated eotl-sites as domain argument caller="/home/decentral1se/work/coop-cloud/abra/cli/internal/validate.go:116 ValidateDomain" FATA[0007] lookup eotl-sites on 127.0.0.53:53: server misbehaving caller="/home/decentral1se/work/coop-cloud/abra/cli/server/add.go:154 glob..func1" stack="/home/decentral1se/work/coop-cloud/abra/cli/server/add.go:154 glob..func1\n/home/decentral1se/go/pkg/mod/github.com/urfave/cli@v1.22.9/app.go:524 HandleAction\n/home/decentral1se/go/pkg/mod/github.com/urfave/cli@v1.22.9/command.go:173 Command.Run\n/home/decentral1se/go/pkg/mod/github.com/urfave/cli@v1.22.9/app.go:405 (*App).RunAsSubcommand\n/home/decentral1se/go/pkg/mod/github.com/urfave/cli@v1.22.9/command.go:378 Command.startApp\n/home/decentral1se/go/pkg/mod/github.com/urfave/cli@v1.22.9/command.go:102 Command.Run\n/home/decentral1se/go/pkg/mod/github.com/urfave/cli@v1.22.9/app.go:277 (*App).Run\n/home/decentral1se/work/coop-cloud/abra/cli/cli.go:203 RunApp\n/home/decentral1se/work/coop-cloud/abra/cmd/abra/main.go:22 main\n/usr/local/go/src/runtime/internal/atomic/types.go:194 (*Uint32).Load\n/usr/local/go/src/runtime/asm_amd64.s:1650 goexit" ```
basebuilder added the
bug
abra
labels 2024-02-06 10:58:14 +00:00
Owner

this would be a great usability improvement I think

this would be a great usability improvement I think
Owner

Seems doable via https://stackoverflow.com/a/74851093 We just need to refactor the logger to be loaded from a single package in which this formatter is set. Could be a pretty huge diff but probably best if we centralise it. Would help any possible logging changes in the future, e.g. #422

Seems doable via https://stackoverflow.com/a/74851093 We just need to refactor the logger to be loaded from a single package in which this formatter is set. Could be a pretty huge diff but probably best if we centralise it. Would help any possible logging changes in the future, e.g. https://git.coopcloud.tech/coop-cloud/organising/issues/422
decentral1se changed title from Abra: use of --debug not rendering line breaks correctly to Use of --debug not rendering line breaks correctly 2024-03-27 06:18:06 +00:00
decentral1se added
enhancement
and removed
bug
labels 2024-03-27 06:18:18 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/organising#567
No description provided.