Log::Log4perl::Config::PropertyConfigurator(3pm)

Log::Log4perl::Config::PropertyConfigurator3pm

Reads properties file

Usage

    # This class is used internally by Log::Log4perl
    use Log::Log4perl::Config::PropertyConfigurator;
    my $conf = Log::Log4perl::Config::PropertyConfigurator->new();
    $conf->file("l4p.conf");
    $conf->parse(); # will die() on error
    my $value = $conf->value("log4perl.appender.LOGFILE.filename");
   
    if(defined $value) {
        printf("The appender's file name is $value\n");
    } else {
        printf("The appender's file name is not defined.\n");
    }

Overview

Initializes log4perl from a properties file, stuff like

    log4j.category.a.b.c.d = WARN, A1
    log4j.category.a.b = INFO, A1

It also understands variable substitution, the following configuration is equivalent to the previous one:

    settings = WARN, A1
    log4j.category.a.b.c.d = ${settings}
    log4j.category.a.b = INFO, A1

Releases

12 releases since Debian 3.1 (Sarge); the text changed 9 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0–7
  5. 8
  6. 9
  7. 10
  8. 11
  9. 12–13
  10. Arch

License

Copyright 2002-2026 by Mike Schilli <[email protected]> and Kevin Goess <[email protected]>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

From perl-log-log4perl 1.58-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.