aboutsummaryrefslogtreecommitdiff
path: root/telegram
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2022-03-20 02:53:20 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2022-03-20 02:53:20 +0300
commit5c238db1da48e6c1d51a3d00f6a661f99de03784 (patch)
treee8ff6d5a824f5dda946794c017a5887b664bc49a /telegram
parent976abf68ce101a4fe6508effde72234951efeea5 (diff)
Improve logging for file download process
Diffstat (limited to 'telegram')
-rw-r--r--telegram/utils.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/telegram/utils.go b/telegram/utils.go
index 39e270e..f60f35f 100644
--- a/telegram/utils.go
+++ b/telegram/utils.go
@@ -356,6 +356,7 @@ func (c *Client) formatForward(fwd *client.MessageForwardInfo) string {
}
func (c *Client) formatFile(file *client.File, compact bool) string {
+ log.Debugf("file: %#v", file)
if file == nil || file.Local == nil || file.Remote == nil {
return ""
}
@@ -367,6 +368,7 @@ func (c *Client) formatFile(file *client.File, compact bool) string {
src = file.Local.Path // source path
_, err := os.Stat(src)
if err != nil {
+ log.Errorf("Cannot access source file: %v", err)
return ""
}