From: djfiander Date: Mon, 12 Jun 2006 23:49:51 +0000 (+0000) Subject: Minor cleanup: be consistent in use of "LOG_" in syslog levels. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0bf2a2e091a836d22a659c2f5ef56227cb36a13e;p=working%2FSIPServer.git Minor cleanup: be consistent in use of "LOG_" in syslog levels. --- diff --git a/ILS.pm b/ILS.pm index 6c1fa18..18f84cb 100644 --- a/ILS.pm +++ b/ILS.pm @@ -29,7 +29,7 @@ sub new { my $type = ref($class) || $class; my $self = {}; - syslog("DEBUG", "new ILS '%s'", $institution->{id}); + syslog("LOG_DEBUG", "new ILS '%s'", $institution->{id}); $self->{institution} = $institution; return bless $self, $type; @@ -51,7 +51,7 @@ sub check_inst_id { my ($self, $id, $whence) = @_; if ($id ne $self->{institution}->{id}) { - syslog("WARNING", "%s: received institution '%s', expected '%s'", + syslog("LOG_WARNING", "%s: received institution '%s', expected '%s'", $whence, $id, $self->{institution}->{id}); } } @@ -392,7 +392,7 @@ sub renew_all { my $item = new ILS::Item $item_id; if (!defined($item)) { - syslog("WARNING", + syslog("LOG_WARNING", "renew_all: Invalid item id associated with patron '%s'", $patron->id); next; diff --git a/ILS/Item.pm b/ILS/Item.pm index 98c3625..31a8244 100644 --- a/ILS/Item.pm +++ b/ILS/Item.pm @@ -31,14 +31,14 @@ sub new { if (!exists($item_db{$item_id})) { - syslog("DEBUG", "new ILS::Item('%s'): not found", $item_id); + syslog("LOG_DEBUG", "new ILS::Item('%s'): not found", $item_id); return undef; } $self = $item_db{$item_id}; bless $self, $type; - syslog("DEBUG", "new ILS::Item('%s'): found with title '%s'", + syslog("LOG_DEBUG", "new ILS::Item('%s'): found with title '%s'", $item_id, $self->{title}); return $self; diff --git a/ILS/Patron.pm b/ILS/Patron.pm index 086d405..5eeda0d 100644 --- a/ILS/Patron.pm +++ b/ILS/Patron.pm @@ -57,13 +57,13 @@ sub new { my $self; if (!exists($patron_db{$patron_id})) { - syslog("DEBUG", "new ILS::Patron(%s): no such patron", $patron_id); + syslog("LOG_DEBUG", "new ILS::Patron(%s): no such patron", $patron_id); return undef; } $self = $patron_db{$patron_id}; - syslog("DEBUG", "new ILS::Patron(%s): found patron '%s'", $patron_id, + syslog("LOG_DEBUG", "new ILS::Patron(%s): found patron '%s'", $patron_id, $self->{id}); bless $self, $type; @@ -332,7 +332,7 @@ sub enable { $self->{$field} = 1; } - syslog("DEBUG", "Patron(%s)->enable: charge: %s, renew:%s, recall:%s, hold:%s", + syslog("LOG_DEBUG", "Patron(%s)->enable: charge: %s, renew:%s, recall:%s, hold:%s", $self->{id}, $self->{charge_ok}, $self->{renew_ok}, $self->{recall_ok}, $self->{hold_ok}); diff --git a/Sip.pm b/Sip.pm index f65aecf..49e392a 100644 --- a/Sip.pm +++ b/Sip.pm @@ -87,7 +87,7 @@ sub add_count { $count = sprintf("%04d", $count); if (length($count) != 4) { - syslog("WARNING", "handle_patron_info: %s wrong size: '%s'", + syslog("LOG_WARNING", "handle_patron_info: %s wrong size: '%s'", $label, $count); $count = ' ' x 4; } diff --git a/Sip/MsgType.pm b/Sip/MsgType.pm index c4e7e58..9d403dd 100644 --- a/Sip/MsgType.pm +++ b/Sip/MsgType.pm @@ -1104,7 +1104,7 @@ sub handle_item_status_update { $item_props = $fields->{(FID_ITEM_PROPS)}; if (!defined($item_id)) { - syslog("WARNING", + syslog("LOG_WARNING", "handle_item_status: received message without Item ID field"); } else { $item = new ILS::Item $item_id; @@ -1148,7 +1148,7 @@ sub handle_patron_enable { $patron_id = $fields->{(FID_PATRON_ID)}; $patron_pwd = $fields->{(FID_PATRON_PWD)}; - syslog("DEBUG", "handle_patron_enable: patron_id: '%s', patron_pwd: '%s'", + syslog("LOG_DEBUG", "handle_patron_enable: patron_id: '%s', patron_pwd: '%s'", $patron_id, $patron_pwd); $patron = new ILS::Patron $patron_id; @@ -1224,7 +1224,7 @@ sub handle_hold { $expiry_date, $pickup_locn, $hold_type, $fee_ack); } else { - syslog("WARNING", "handle_hold: Unrecognized hold mode '%s' from terminal '%s'", + syslog("LOG_WARNING", "handle_hold: Unrecognized hold mode '%s' from terminal '%s'", $hold_mode, $server->{account}->{id}); $status = new ILS::Transaction::Hold; $status->screen_msg("System error. Please contact library status"); @@ -1275,7 +1275,7 @@ sub handle_renew { $ils->check_inst_id($fields->{(FID_INST_ID)}, "handle_renew"); if ($no_block eq 'Y') { - syslog("WARNING", + syslog("LOG_WARNING", "handle_renew: recieved 'no block' renewal from terminal '%s'", $server->{account}->{id}); } @@ -1455,7 +1455,7 @@ sub patron_status_string { my $patron = shift; my $patron_status; - syslog("DEBUG", "patron_status_string: %s charge_ok: %s", $patron->id, + syslog("LOG_DEBUG", "patron_status_string: %s charge_ok: %s", $patron->id, $patron->charge_ok); $patron_status = sprintf('%s%s%s%s%s%s%s%s%s%s%s%s%s%s', denied($patron->charge_ok),