~rkintzi/statusbar

7df950983d204a7e0d0e307890957eadac91e1f9 — RadosÅ‚aw Kintzi 10 months ago 5119662
Set slog.DefaultLogger()
2 files changed, 3 insertions(+), 1 deletions(-)

M cmds/statusbar/main.go
M statusbar.go
M cmds/statusbar/main.go => cmds/statusbar/main.go +2 -0
@@ 2,6 2,7 @@ package main

import (
	"fmt"
	"log/slog"
	"os"

	"gobytes.dev/statusbar"


@@ 10,6 11,7 @@ import (

func main() {
	cfg := statusbar.Configuration{}
	cfg.SetLogger(slog.Default())
	err := cfg.Run(nil)
	abortOnErr(err)
}

M statusbar.go => statusbar.go +1 -1
@@ 54,7 54,7 @@ func New(ws ...Widget) *StatusBar {
	return b
}

func (b StatusBar) SetLogger(l *slog.Logger) { b.logger = l }
func (b *StatusBar) SetLogger(l *slog.Logger) { b.logger = l }

func (b *StatusBar) Run(ctx context.Context) {
	b.openLogFile()