Set the log prefix immediately after forking, based on the passed-in type
authorGreg Sabino Mullane <greg@endpoint.com>
Sun, 1 Jun 2014 20:34:09 +0000 (16:34 -0400)
committerGreg Sabino Mullane <greg@endpoint.com>
Sun, 1 Jun 2014 20:34:09 +0000 (16:34 -0400)
Bucardo.pm

index 472ee652a1e6191d74c39b32abd9abdab0cb7c88..55384f29294b65acd8e43ca259a5bdd2ae4fc45d 100644 (file)
@@ -7086,6 +7086,10 @@ sub fork_and_inactivate {
     else { ## Kid
         ## Walk through the list of all known DBI databases
         ## Inactivate each one, then undef it
+
+        ## Change to a better prefix, so 'MCP' does not appear in the logs
+        $self->{logprefix} = $type;
+
         ## It is probably still referenced elsewhere, so handle that - how?
         for my $iname (keys %{ $self->{dbhlist} }) {
             my $ldbh = $self->{dbhlist}{$iname};