Skip to content

Commit

Permalink
logging: move all fmt.Println to log.Println
Browse files Browse the repository at this point in the history
Signed-off-by: Tomkoid <[email protected]>
  • Loading branch information
tomkoid committed May 6, 2024
1 parent 1acdb85 commit 251ab6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/audio/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func StopAudio(config *config.Config) {
log.Println("Stopping audio")
log.Println("Stopping audio.")
// if mpc binary exists on system
if _, err := exec.LookPath("mpc"); err == nil && config.Mpc {
err = tools.RunCommand("mpc", "pause")
Expand Down
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"fmt"
"log"

"mrogalski.eu/go/pulseaudio"
Expand Down Expand Up @@ -40,6 +39,8 @@ func main() {
log.Fatal(err)
}

log.Println("Starting audio monitoring.")

// Monitor the default sink for changes
for {
<-updateChan
Expand All @@ -54,7 +55,7 @@ func main() {

// Check if the sink name has changed
if defaultSink.CardID != initialSinkName {
fmt.Printf(
log.Printf(
"Audio source changed from %s to %s\n",
initialSinkName,
defaultSink.CardID,
Expand Down

0 comments on commit 251ab6c

Please sign in to comment.