File: MyHandlerLog4Perl.pm

package info (click to toggle)
lemonldap-ng 1.1.2-5%2Bdeb7u1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 11,500 kB
  • sloc: perl: 22,090; makefile: 592; sh: 113; php: 6; sql: 5
file content (68 lines) | stat: -rw-r--r-- 2,118 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package My::Package;
use Lemonldap::NG::Handler::SharedConf;
@ISA = qw(Lemonldap::NG::Handler::SharedConf);

use Log::Log4perl;

sub logForbidden {
    my $class = shift;
    my $log   = Log::Log4perl->get_logger("My::Package");
    $log->warn(
            'The user "'
          . $datas->{$whatToTrace}
          . '" was reject when he tried to access to '
          . shift,
    );
}

__PACKAGE__->init(
    {

        # ACCESS TO CONFIGURATION

      # By default, Lemonldap::NG uses the default lemonldap-ng.ini file to know
      # where to find is configuration
      # (generaly /etc/lemonldap-ng/lemonldap-ng.ini)
      # You can specify by yourself this file :
      #configStorage => { confFile => '/path/to/my/file' },

        # You can also specify directly the configuration
        # (see Lemonldap::NG::Handler::SharedConf(3))
        #configStorage => {
        #      type => 'File',
        #      dirName => '/usr/local/lemonldap-ng/data/conf/'
        #},

        # STATUS MODULE
        # Uncomment this to activate status module:
        #status => 1,

        # REDIRECTIONS
        # You have to set this to explain to the handler if runs under SSL
        # or not (for redirections after authentications). Default is true.
        https => 0,

        # You can also fix the port (for redirections after authentications)
        #port => 80,

        # CUSTOM FUNCTION
        # If you want to create customFunctions in rules, declare them here:
        #customFunctions    => 'function1 function2',
        #customFunctions    => 'Package::func1 Package::func2',

        # OTHERS
        # You can also overload any parameter issued from manager
        # configuration. Example:
        #globalStorage => 'Lemonldap::NG::Common::Apache::Session::SOAP',
        #globalStorageOptions => {
        #    proxy => 'http://auth.example.com/index.pl/sessions',
        #    proxyOptions => {
        #        timeout => 5,
        #    },
        #    # If soapserver is protected by HTTP Basic:
        #    User     => 'http-user',
        #    Password => 'pass',
        #},
    }
);
1;