Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
OpenXPKI::Log4perl(3) User Contributed Perl DocumentationOpenXPKI::Log4perl(3)

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

SYNOPSIS
	   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".

DESCRIPTION
       This wrapper contains the following enhancements:

       o   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

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

       Parameters:

       o   $config

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

       o   $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.

perl v5.32.1			  2021-03-01		 OpenXPKI::Log4perl(3)

NAME | SYNOPSIS | DESCRIPTION | METHODS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=OpenXPKI::Log4perl&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help