Bug 26922: Regression tests
[koha.git] / C4 / SIP / Logger.pm
blob42c19f00ec8224b9ad5d5a109f4cbb70c51bfb2a
1 package C4::SIP::Logger;
3 use Modern::Perl;
5 use base 'Exporter';
6 our @EXPORT_OK = qw ( get_logger set_logger );
8 our $activeSIPServer;
9 our $activeLogger;
11 =head1 NAME
13 C4::SIP::Logger - Module for handling SIP server logging
15 =head2 get_SIPServer
17 my $sipServer = C4::SIP::SIPServer::get_SIPServer()
19 @RETURNS C4::SIP::SIPServer, the current server's child-process used to handle this SIP-transaction
21 =cut
23 sub get_SIPServer {
24 return $activeSIPServer;
27 =head2 _set_SIPServer
29 my $sipServer = C4::SIP::SIPServer::_set_SIPServer($sipServer)
31 Sets the passed in SIP server as the active SIP server and returns it as well
33 @RETURNS C4::SIP::SIPServer, the current server's child-process used to handle this SIP-transaction
35 =cut
37 sub _set_SIPServer {
38 my ($sipServer) = @_;
39 $activeSIPServer = $sipServer;
40 return $activeSIPServer;
43 =head2 get_logger
45 my $logger = C4::SIP::SIPServer::get_logger()
47 @RETURNS Koha::Logger, the logger used to log this SIP-transaction
49 =cut
51 sub get_logger {
52 return $activeLogger;
55 =head2 set_logger
57 my $logger = C4::SIP::SIPServer::set_logger($logger)
59 =cut
61 sub set_logger {
62 my ($logger) = @_;
63 $activeLogger = $logger;
64 return $activeLogger;
69 __END__