GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
OpenXPKI::Log4perl(3) User Contributed Perl Documentation OpenXPKI::Log4perl(3)

OpenXPKI::Log4perl - Tiny wrapper around Log::Log4perl's init methods to provide some custom enhancements

    use OpenXPKI::Log4perl;

    OpenXPKI::Log4perl->init_or_fallback($cfg_file);
    my $log = Log::Log4perl->get_logger(...);

Please note that you do NOT have to additionally "use Log::Log4perl" as it's already loaded by "OpenXPKI::Log4perl".

This wrapper contains the following enhancements:
PatternLayout placeholder %i

If used in a PatternLayout in log4perl.conf it is replaced with all currently set Log::Log4perl::MDC variables like user, role, sid, wftype, wfid or scepid concatenated by "|":

    user=doe|role=caop|wftype=report_list|wfid=343
    

Initialize Log4perl with the given configuration or fallback to STDERR output in case the configuration cannot be read.

Parameters:

  • $config

    configuration: file path, reference to SCALAR or HashRef or empty string

  • $fallback_prio

    log priority (level) to use for output to STDERR if there is a problem with the given config (optional, default: WARN)

If the first parameter is undef or the config file is not found, the constructor will print a warning message. So if you are fine with the default screen logger, pass an empty string as first an, optional, the wanted log level as second parameter.

2022-05-14 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.