refactor(diary): share the console types through internal/consolekit so diary no longer links bonfire (IN-07, quick-261028-rqd)
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"path/filepath"
|
||||
"sync/atomic"
|
||||
|
||||
"git.golem15.com/golem15/summercms/modules/bonfire"
|
||||
"git.golem15.com/golem15/summercms/internal/consolekit"
|
||||
"git.golem15.com/golem15/summercms/modules/sunscreen"
|
||||
"github.com/charmbracelet/colorprofile"
|
||||
)
|
||||
@@ -103,7 +103,7 @@ func (b *channelBuilder) build(name string) (slog.Handler, error) {
|
||||
case FormatLogfmt:
|
||||
leaf = slog.NewTextHandler(w, hopts)
|
||||
default:
|
||||
profile := bonfire.DetectProfile(w, b.opts.Color, b.opts.Environ)
|
||||
profile := consolekit.DetectProfile(w, b.opts.Color, b.opts.Environ)
|
||||
if profile > colorprofile.NoTTY {
|
||||
leaf = newConsoleHandler(w, ConsoleOptions{Level: lv, Profile: profile}, b.out.source)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user