Răsfoiți Sursa

change log target to database

root 4 ani în urmă
părinte
comite
91940bc02f
1 a modificat fișierele cu 4 adăugiri și 4 ștergeri
  1. 4 4
      scripts/garbage.pl

+ 4 - 4
scripts/garbage.pl

@@ -246,8 +246,8 @@ foreach my $auth (@auth_full_list) {
         $new->{ip}=$auth->{ip};
         $new->{mac}=$auth_mac;
         $new->{timestamp}=$auth->{last_found};
-        log_info("Auth id: $auth->{id} $auth_mac found at location:");
-        log_info(Dumper($new));
+        db_log_info($dbh,"Auth id: $auth->{id} $auth_mac found at location:");
+        db_log_info($dbh,Dumper($new));
         insert_record($dbh,"mac_history",$new);
         next;
         }
@@ -262,8 +262,8 @@ foreach my $auth (@auth_full_list) {
             $new->{ip}=$auth->{ip};
             $new->{mac}=$auth_mac;
             $new->{timestamp}=$auth->{last_found};
-            log_info("Auth id: $auth->{id} $auth_mac moved to another location:");
-            log_info(Dumper($new));
+            db_log_info($dbh,"Auth id: $auth->{id} $auth_mac moved to another location:");
+            db_log_info($dbh,Dumper($new));
             insert_record($dbh,"mac_history",$new);
             }
 }