From 9c8e546765cfeaa1de22a4537ff422197c24b76b Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 18 Dec 2023 22:44:55 +1100 Subject: [PATCH] Increase some logging for binkp sessions --- app/Classes/File/Send.php | 8 ++++---- app/Classes/Protocol/Binkp.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Classes/File/Send.php b/app/Classes/File/Send.php index 4c18c74..f20a376 100644 --- a/app/Classes/File/Send.php +++ b/app/Classes/File/Send.php @@ -123,7 +123,7 @@ class Send extends Base if ($successful) { $end = time()-$this->start; - Log::debug(sprintf('%s: - Closing [%s], sent in [%d] with [%s] items',self::LOGKEY,$this->sending->nameas,$end,$this->sending->dbids->count())); + Log::info(sprintf('%s:- Closing [%s], sent in [%d] with [%s] items',self::LOGKEY,$this->sending->nameas,$end,$this->sending->dbids->count())); } $this->sending->close($successful,$node); @@ -136,7 +136,7 @@ class Send extends Base // If the node is marked as hold - dont send any files. if ($ao->system->hold) { - Log::info(sprintf('%s: - System [%d] is marked as hold - not checking for files.',self::LOGKEY,$ao->system_id)); + Log::info(sprintf('%s:- System [%d] is marked as hold - not checking for files.',self::LOGKEY,$ao->system_id)); return FALSE; } @@ -193,7 +193,7 @@ class Send extends Base // If the node is marked as hold - dont send any files. if ($ao->system->hold) { - Log::info(sprintf('%s: - System [%d] is marked as hold - not checking for files.',self::LOGKEY,$ao->system_id)); + Log::info(sprintf('%s:- System [%d] is marked as hold - not checking for files.',self::LOGKEY,$ao->system_id)); return FALSE; } @@ -228,7 +228,7 @@ class Send extends Base if ((($this->index=$this->list->search(function($item) { return $item->complete === FALSE; })) !== FALSE) && $this->sending->open()) { - Log::debug(sprintf('%s:- Sending item [%d] (%s)',self::LOGKEY,$this->index,$this->sending->nameas)); + Log::info(sprintf('%s:- Sending item [%d] (%s)',self::LOGKEY,$this->index,$this->sending->nameas)); $this->pos = 0; $this->start = time(); diff --git a/app/Classes/Protocol/Binkp.php b/app/Classes/Protocol/Binkp.php index aa026c7..043686a 100644 --- a/app/Classes/Protocol/Binkp.php +++ b/app/Classes/Protocol/Binkp.php @@ -1337,7 +1337,7 @@ final class Binkp extends BaseProtocol // Open our next file to send if ($this->send->togo_count && ! $this->send->fd) { - Log::info(sprintf('%s:- Opening next file to send',self::LOGKEY)); + Log::info(sprintf('%s:- Opening next file to send - we have [%d] left',self::LOGKEY,$this->send->togo_count)); $this->send->open(); } @@ -1475,7 +1475,7 @@ final class Binkp extends BaseProtocol { // Add our mail to the queue if we have authenticated if ($node->aka_authed) { - Log::debug(sprintf('%s:- We have authed these AKAs [%s]',self::LOGKEY,$node->aka_remote_authed->pluck('ftn')->join(','))); + Log::info(sprintf('%s:- We have authed these AKAs [%s]',self::LOGKEY,$node->aka_remote_authed->pluck('ftn')->join(','))); foreach ($node->aka_remote_authed as $ao) { Log::debug(sprintf('%s:- Checking for any new mail and files to [%s]',self::LOGKEY,$ao->ftn)); @@ -1500,7 +1500,7 @@ final class Binkp extends BaseProtocol */ } - Log::debug(sprintf('%s:- We have [%d] items to send to [%s]',self::LOGKEY,$this->send->togo_count,$ao->system->name)); + Log::info(sprintf('%s:- We have [%d] items to send to [%s]',self::LOGKEY,$this->send->togo_count,$ao->system->name)); } else { // @todo We should only send netmail if unauthenticated - netmail that is direct to this node (no routing)