From cd726c12465ff7b31d6006b8c604bd386137d57a Mon Sep 17 00:00:00 2001 From: Kaimi Date: Sun, 13 Sep 2020 14:58:16 +0300 Subject: [PATCH] Update logging Fixes #23 --- src/ya.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ya.pl b/src/ya.pl index 2778202..b0b0611 100755 --- a/src/ya.pl +++ b/src/ya.pl @@ -307,8 +307,7 @@ my @include = (); if($opt{debug}) { - info(DEBUG, 'Yandex Music Downloader v' . VERSION . NL . NL); - print_perl_info(); + print_debug_info(); } if($opt{proxy}) @@ -1220,7 +1219,11 @@ sub log_response } } -sub print_perl_info +sub print_debug_info { + info(DEBUG, 'Yandex Music Downloader v' . VERSION . NL . NL); info(DEBUG, 'OS: ' . $^O . '; Path: ' . $^X . '; Version: ' . $^V); + + info(DEBUG, 'Cookie: ' . $opt{cookie}) if $opt{cookie}; + info(DEBUG, 'Auth: ' . $opt{auth}) if $opt{auth}; }