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

FreeBSD Manual Pages


home | help
OpenXPKI::Debug(3)    User Contributed Perl Documentation   OpenXPKI::Debug(3)

       OpenXPKI::Debug - central debugging class of OpenXPKI.

       This is the central debugging module of OpenXPKI. If you	write a	new
       module then you can include it by simply	making an appropriate use

       use OpenXPKI::Debug;

       It is not necessary to remove this line if you don't debug your code.
       The activation of the debugging statements is handled by	some static
       variables of the	debug module. If you want to debug your	code then you
       have to do the following.

       1. Include some debug statements	into your module code:
	   my $variable	= "some	critical content"; ##! 2: $variable

	   A debug statement must be started with "\s*##!". The	next number
	   specifies the debug level. Higher levels mean more messages.	If the
	   message is important	then you should	choose a small number bigger
	   than	zero. The colon	is a separator.	After the colon	the code
	   follows which will be executed.

	   If we use debug level 1 for this module then	the above message will
	   not be displayed. If	you use	3 then the above message will be

       2. Use your module:
	   Add to the startup script the following lines:

	   use OpenXPKI::Debug;	$OpenXPKI::Debug::LEVEL{'MyM.*'} = 100;

	   require MyModule; ##	or require a module which use my Module

	   In practice you will	only have to add the LEVEL line	because
	   require is used to load the server which does the rest for you.

	   Please remember to not implement a use statement before you run
	   require after you specified the debug level.	This debug module
	   manipulates the code	parsing	of Perl!!!

       This function is	executed if you	call use or require for	a module.  It
       checks if debugging is activated	for this module	and decides whether a
       source filter has to be loaded or not.

       is the function which implements	the source filtering for the
       debugging.  The function	will only be used if the debugging was
       activated by the	import function. Please	see Filter::Util::Call for
       more details.

       This function builds the	debug message. It outputs such things like the
       debug level, the	module name and	the source code	line.

       This method is used to censor debug messages that potentially contain
       confidential information	such as	passwords or private keys.

See also

perl v5.24.1			  2017-07-03		    OpenXPKI::Debug(3)

Name | Description | Functions | See also

Want to link to this manual page? Use this URL:

home | help