refactor: include channel name in logs
This commit is contained in:
parent
79be6e94f2
commit
3fa382a41f
6
main.go
6
main.go
|
|
@ -55,7 +55,7 @@ func dl(d Download) {
|
|||
"--no-progress",
|
||||
"--sleep-interval", "1",
|
||||
"--sleep-subtitles", "1",
|
||||
"--sleep-requests", "1",
|
||||
"--sleep-requests", "0",
|
||||
"--prefer-free-formats",
|
||||
"--write-subs",
|
||||
"--no-write-automatic-subs",
|
||||
|
|
@ -85,7 +85,7 @@ func dl(d Download) {
|
|||
defer wg.Done()
|
||||
scanner := bufio.NewScanner(stdout)
|
||||
for scanner.Scan() {
|
||||
log.Printf("%s\n", scanner.Text())
|
||||
log.Printf("[%s] %s\n", d.Name, scanner.Text())
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ func dl(d Download) {
|
|||
defer wg.Done()
|
||||
scanner := bufio.NewScanner(stderr)
|
||||
for scanner.Scan() {
|
||||
log.Printf("%s\n", scanner.Text())
|
||||
log.Printf("[%s] %s\n", d.Name, scanner.Text())
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue