Changeset 63 for trunk


Ignore:
Timestamp:
01/20/10 17:36:39 (15 years ago)
Author:
Kris Deugau
Message:

/trunk

Tweak and normalize some existing but inconsistently-formatted logging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r62 r63  
    259259  }
    260260
     261  if ($webvar{del_failed}) {
     262    $page->param(del_failed => 1);
     263    $page->param(errmsg => $webvar{errmsg});
     264  }
     265
    261266} elsif ($webvar{page} eq 'record') {
    262267
     
    286291      if ($webvar{defrec} eq 'y') {
    287292        logaction(0, $session->param("username"), $webvar{parentid},
    288                 "Added default record '$typemap{$webvar{type}} $webvar{name} $webvar{address}', TTL $webvar{ttl}");
     293                "Added default record '$webvar{name} $typemap{$webvar{type}} $webvar{address}', TTL $webvar{ttl}");
    289294      } else {
    290295        logaction($webvar{parentid}, $session->param("username"), parentID($webvar{parentid}, 'dom', 'group'),
    291                 "Added record '$typemap{$webvar{type}} $webvar{name} $webvar{address}', TTL $webvar{ttl}");
     296                "Added record '$webvar{name} $typemap{$webvar{type}} $webvar{address}', TTL $webvar{ttl}");
    292297      }
    293298      changepage(page => "reclist", id => $webvar{parentid}, defrec => $webvar{defrec});
     
    304309      if ($webvar{defrec} eq 'y') {
    305310        logaction(0, $session->param("username"), $webvar{parentid},
    306                 "Failed adding default record '$webvar{name} $typemap{$webvar{type}} $webvar{address}', TTL $webvar{ttl}");
     311                "Failed adding default record '$webvar{name} $typemap{$webvar{type}} $webvar{address}', TTL $webvar{ttl} ($msg)");
    307312      } else {
    308313        logaction($webvar{parentid}, $session->param("username"), parentID($webvar{parentid}, 'dom', 'group'),
    309                 "Failed adding record '$webvar{name} $typemap{$webvar{type}} $webvar{address}', TTL $webvar{ttl}");
     314                "Failed adding record '$webvar{name} $typemap{$webvar{type}} $webvar{address}', TTL $webvar{ttl} ($msg)");
    310315      }
    311316    }
     
    364369      if ($webvar{defrec} eq 'y') {
    365370        logaction(0, $session->param("username"), $webvar{parentid},
    366                 "Failed updating default record '$typemap{$webvar{type}} $webvar{name} $webvar{address}', TTL $webvar{ttl}");
     371                "Failed updating default record '$typemap{$webvar{type}} $webvar{name} $webvar{address}', TTL $webvar{ttl} ($msg)");
    367372      } else {
    368373        logaction($webvar{parentid}, $session->param("username"), parentID($webvar{parentid}, 'dom', 'group'),
    369                 "Failed updating record '$typemap{$webvar{type}} $webvar{name} $webvar{address}', TTL $webvar{ttl}");
     374                "Failed updating record '$typemap{$webvar{type}} $webvar{name} $webvar{address}', TTL $webvar{ttl} ($msg)");
    370375      }
    371376    }
     
    400405      if ($webvar{defrec} eq 'y') {
    401406        logaction(0, $session->param("username"), $rec{parid},
    402                 "Failed deleting default record '$rec{host} $typemap{$rec{type}} $rec{val}', TTL $rec{ttl}");
     407                "Failed deleting default record '$rec{host} $typemap{$rec{type}} $rec{val}', TTL $rec{ttl} ($msg)");
    403408      } else {
    404409        logaction($rec{parid}, $session->param("username"), parentID($rec{parid}, 'dom', 'group'),
    405                 "Failed deleting record '$rec{host} $typemap{$rec{type}} $rec{val}', TTL $rec{ttl}");
     410                "Failed deleting record '$rec{host} $typemap{$rec{type}} $rec{val}', TTL $rec{ttl} ($msg)");
    406411      }
     412changepage(page => "reclist", id => $webvar{parentid}, defrec => $webvar{defrec}, del_failed => 1, errmsg => $msg);
    407413      $page->param(del_failed => 1);
    408414      $page->param(errmsg => $msg);
Note: See TracChangeset for help on using the changeset viewer.