1 # $Id: Web.pm,v 1.4 2006-10-31 15:22:31 mike Exp $
3 package ZOOM::IRSpy::Web;
10 our @ISA = qw(ZOOM::IRSpy);
12 use ZOOM::IRSpy::Utils qw(xml_encode);
17 ZOOM::IRSpy::Web - subclass of ZOOM::IRSpy for use by Web UI
21 This behaves exactly the same as the base C<ZOOM::IRSpy> class except
22 that the Clog()> method does not call YAZ log, but outputs
23 HTML-formatted messages on standard output. The additional function
24 log_init_level() controls what log-levels are to be included in the
33 my $old = $this->{log_level};
34 $this->{log_level} = $level if defined $level;
42 $this->{log_level} = "irspy" if !defined $this->{log_level};
43 return if index(("," . $this->{log_level} . ","), ",$level,") < 0;
45 my $message = "[$level] " . join("", @s);
47 print xml_encode($message), "<br/>\n";
49 ### This is naughty -- it knows about HTML::Mason
50 $HTML::Mason::Commands::m->flush_buffer();
60 Mike Taylor, E<lt>mike@indexdata.comE<gt>
62 =head1 COPYRIGHT AND LICENSE
64 Copyright (C) 2006 by Index Data ApS.
66 This library is free software; you can redistribute it and/or modify
67 it under the same terms as Perl itself, either Perl version 5.8.7 or,
68 at your option, any later version of Perl 5 you may have available.