@@ -82,11 +82,11 @@ def _record_error(self, message: str) -> None:
8282 if message not in self .error_messages :
8383 self .error_messages .append (message )
8484
85- def _record_container_skipped (self , c : Container , reason : str , message : str , log = True ) -> None :
85+ def _record_container_skipped (self , c : Container , reason : str , message : str , log = True , level : str = "INFO" ) -> None :
8686 self .containers_skipped .add (c .name )
8787 self .container_skip_reasons .setdefault (c .name if c .name else str (c .id ), reason )
8888 if log :
89- self .log_this (message , "WARN" )
89+ self .log_this (message , level )
9090
9191 def _record_container_failed (self , c : Container , reason : str , message : str , log = True ) -> None :
9292 self .containers_failed .add (c .name )
@@ -180,7 +180,9 @@ def _should_skip_container(self, c: Container) -> bool:
180180 # Attempt to pull info from container. Skip if not found
181181 info = str (c .name ) + " " + str (c .id ) + " " + str (c .image ) + " " + str (c .labels )
182182 except ImageNotFound as e :
183- self ._record_container_skipped (c , "image_not_found" , "Skipping container because its info was not found." )
183+ self ._record_container_skipped (
184+ c , "image_not_found" , "Skipping container because its info was not found." , level = "WARN"
185+ )
184186 return True
185187
186188 if "minituff/nautical-backup" in str (c .image ):
@@ -738,7 +740,7 @@ def _backup_container_folders(self, c: Container, dest_path: Optional[Path] = No
738740 pass
739741 else :
740742 self ._record_container_skipped (
741- c , "source_directory_missing" , f"Source directory { src_dir } does not exist. Skipping"
743+ c , "source_directory_missing" , f"Source directory { src_dir } does not exist. Skipping" , level = "WARN"
742744 )
743745
744746 additional_folders_when = str (self .get_label (c , "additional-folders.when" , "during" )).lower ()
@@ -1041,6 +1043,7 @@ def backup(self):
10411043 c ,
10421044 "source_directory_missing" ,
10431045 f"{ c .name } - Source directory does not exist. Skipping" ,
1046+ level = "WARN" ,
10441047 )
10451048 continue
10461049
@@ -1071,7 +1074,10 @@ def backup(self):
10711074 if stop_before_backup .lower () == "true" and stop_before_backup_env == True :
10721075 if c .name not in self .containers_skipped :
10731076 self ._record_container_skipped (
1074- c , "not_stopped" , f"Skipping backup of { c .name } because it was not stopped"
1077+ c ,
1078+ "not_stopped" ,
1079+ f"Skipping backup of { c .name } because it was not stopped" ,
1080+ level = "WARN" ,
10751081 )
10761082 else :
10771083 self ._record_container_skipped (
@@ -1137,7 +1143,7 @@ def backup(self):
11371143 skipped_names = self .logger .set_to_string (self .containers_skipped )
11381144 self .log_this (
11391145 f"Skipped { len (self .containers_skipped )} containers: { skipped_names } " ,
1140- "WARN " ,
1146+ "INFO " ,
11411147 )
11421148 if self .containers_failed :
11431149 self .log_this (
0 commit comments