detached 11227e8

fix(config): replace stdout logging with proper logging system

commit
11227e89570a844658029a384956e1facfc4ea81
author
bamen · · 2025-09-12 13:01 UTC
parent
e3615c6
signature
unsigned
1 file · +4 -3
M internal/config/config.go +4 -3
@@ -11,6 +11,7 @@ import (
1111 "sync"
1212 "time"
1313
14+ "github.com/bnema/dumber/internal/logging"
1415 "github.com/bnema/dumber/pkg/gpu"
1516 "github.com/fsnotify/fsnotify"
1617 "github.com/spf13/viper"
@@ -602,7 +603,7 @@ func (m *Manager) validateAndConfigureCodecPreferences(config *Config) *Config {
602603 // Get detailed AV1 capabilities
603604 av1Caps := gpuInfo.GetAV1HardwareCapabilities()
604605 if av1Caps["decode"] {
605- fmt.Printf("Config: GPU supports AV1 hardware decode\n")
606+ logging.Info("GPU supports AV1 hardware decode")
606607
607608 // If GPU supports AV1, prefer it over VP9
608609 if !config.CodecPreferences.ForceAV1 &&
@@ -619,8 +620,8 @@ func (m *Manager) validateAndConfigureCodecPreferences(config *Config) *Config {
619620 }
620621
621622 // Log GPU-specific codec capabilities
622- fmt.Printf("Config: %s GPU codec capabilities - AV1: decode=%t, encode=%t, 10bit=%t\n",
623- gpuInfo.Vendor, av1Caps["decode"], av1Caps["encode"], av1Caps["10bit"])
623+ logging.Info(fmt.Sprintf("%s GPU codec capabilities - AV1: decode=%t, encode=%t, 10bit=%t",
624+ gpuInfo.Vendor, av1Caps["decode"], av1Caps["encode"], av1Caps["10bit"]))
624625 }
625626
626627 return config
@@ -11,6 +11,7 @@ import (
11 "sync"11 "sync"
12 "time"12 "time"
13 13
14+ "github.com/bnema/dumber/internal/logging"
14 "github.com/bnema/dumber/pkg/gpu"15 "github.com/bnema/dumber/pkg/gpu"
15 "github.com/fsnotify/fsnotify"16 "github.com/fsnotify/fsnotify"
16 "github.com/spf13/viper"17 "github.com/spf13/viper"
@@ -602,7 +603,7 @@ func (m *Manager) validateAndConfigureCodecPreferences(config *Config) *Config {
602 // Get detailed AV1 capabilities603 // Get detailed AV1 capabilities
603 av1Caps := gpuInfo.GetAV1HardwareCapabilities()604 av1Caps := gpuInfo.GetAV1HardwareCapabilities()
604 if av1Caps["decode"] {605 if av1Caps["decode"] {
605- fmt.Printf("Config: GPU supports AV1 hardware decode\n")606+ logging.Info("GPU supports AV1 hardware decode")
606 607
607 // If GPU supports AV1, prefer it over VP9608 // If GPU supports AV1, prefer it over VP9
608 if !config.CodecPreferences.ForceAV1 &&609 if !config.CodecPreferences.ForceAV1 &&
@@ -619,8 +620,8 @@ func (m *Manager) validateAndConfigureCodecPreferences(config *Config) *Config {
619 }620 }
620 621
621 // Log GPU-specific codec capabilities622 // Log GPU-specific codec capabilities
622- fmt.Printf("Config: %s GPU codec capabilities - AV1: decode=%t, encode=%t, 10bit=%t\n",623+ logging.Info(fmt.Sprintf("%s GPU codec capabilities - AV1: decode=%t, encode=%t, 10bit=%t",
623- gpuInfo.Vendor, av1Caps["decode"], av1Caps["encode"], av1Caps["10bit"])624+ gpuInfo.Vendor, av1Caps["decode"], av1Caps["encode"], av1Caps["10bit"]))
624 }625 }
625 626
626 return config627 return config

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close