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;
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});
}
}
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;
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;
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;
$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});
$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;
}
$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;
$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;
$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");
$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});
}
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),