PANIC Configuration


The level of detail in PANIC file can be customized using the panconf.xml configuration file which controls the amount of data captured on a per variable or a per user basis. By default PANIC only dumps at most X array elements and truncates strings at Y bytes in order to keep a reasonable the size for PANIC files.

When KCML starts up it attempts to locate "panconf.xml" in the kcml directory, or for the file specified by the environment variable KCML_PANIC_CONF if it is defined. If found it parses the file looking for entries for the current user which it holds as the default for the number of array elements and the length of strings to be used in the event of a PANIC. It also records the variables for which special handling is required.

Typical XML might be:

<?xml version="1.0"?>
<panconf>
	<user name="rjc">
		<arrayelems>52</arrayelems>
		<stringlen>71</stringlen
	</user>
	<var name="a$()">
		<arrayelems>3</arrayelems>
		<stringlen>123</stringlen
	</var>
</panconf>

The name attribute can be a pattern. There will be a caseless match for the <var> name and a case-sensitive match for <user> name attribute value. Tags can be nested.

<?xml version="1.0"?>
<panconf>
	<var name="b$()">
		<arrayelems>4</arrayelems>
		<stringlen>64</stringlen
	</var>
	<user name="fred">
		<arrayelems>52</arrayelems>
		<stringlen>71</stringlen
		<var name="b$()">
			<arrayelems>16</arrayelems>
			<stringlen>128</stringlen
		</var>
	</user>
</panconf>

Session history

The session history in the PANIC file contains edited highlights of the session. Always included are the session start and end times but other events can be recorded by specifying <history> tags in the panic configuration file. For each event type there is a count to limit the maximum number of events recorded of that type as only the most recent events are kept. The type can be an exact name from the list of possible types:

Start
End
DollarRelease
DollarEnd
Event
FormStart
FormEnd
Function
DebuggerBreakIn
ImmediateStatement

or use "*" to match several types. For example:

	<history type="form*" count="50"/>
	<history type="dollarrelease*" count="20"/>

will record at most 50 of each type of form event and also the last 20 occurrences of $RELEASE.

stringlenMaximum length of string.
arrayelemsMaximum number of array elements.
poolhandlesMaximum number of pool handles.
userName a user to which the child elements apply
nameattributeUser name. Can be be a wildcard.
stringlenelement (0 or 1 times)
arrayelemselement (0 or 1 times)
poolhandleselement (0 or 1 times)
userelement (may be repeated)
varelement (may be repeated)
libraryelement (may be repeated)
historyelement (may be repeated)
errorelement (may be repeated)
varName a variable to control in the panic file.
nameattributeVariable name.
stringlenelement (0 or 1 times)
arrayelemselement (0 or 1 times)
libraryName a library to control in the panic file.
nameattributeName of library (e.g. CRMCore or CRM*)
historyControl type and quantity of sesssion history information.
typeattributeType of history event
countattributeCount of how many events of this type to track
errorNominate a run-time error not to force a panic file. Session will stil terminate
majorattributeMajor error number, such as I95
minorattributeOptional minor error number
panconfRoot node
stringlenelement (0 or 1 times)
arrayelemselement (0 or 1 times)
poolhandleselement (0 or 1 times)
userelement (may be repeated)
varelement (may be repeated)
libraryelement (may be repeated)
historyelement (may be repeated)
errorelement (may be repeated)

Compatibility

Introduced with KCML 6.90.

See also:

PANIC,