Skip to content

Progressbar and Logger do not work at the same time #626

@jurelou

Description

@jurelou

Hi, I'm trying to bind a Logger and a ProgressBar to the same DefaultMultiPrinter

When binding the logger i have the following errors:

panic: runtime error: index out of range [-1]

goroutine 20 [running]:
github.com/pterm/pterm.(*MultiPrinter).getString(0xc00020e060?)
        <project>/vendor/github.com/pterm/pterm/multi_live_printer.go:67 +0x1c6
github.com/pterm/pterm.(*MultiPrinter).Start.func1()
        <project>/vendor/github.com/pterm/pterm/multi_live_printer.go:88 +0x25
atomicgo.dev/schedule.Every.func1()
        <project>/vendor/atomicgo.dev/schedule/schedule.go:106 +0x8f
created by atomicgo.dev/schedule.Every in goroutine 1
        <project>/vendor/atomicgo.dev/schedule/schedule.go:102 +0x15b
exit status 2

i'm using pterm v1.12.76

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions