project BLF > class Session > method SetDebugLevel
Description
set the level of business logging
Parameters
Internal usage
BLF
QadFinancials
program code (program1/session.p)
viOldLevel = viSessionDebugLevel.
/* ================================================================= */
/* Finish unit test (move intermediate output to final output). */
/* ================================================================= */
if (iiDebugLevel mod 64) < 32
and (viOldLevel mod 64) > 31
then do:
run StartLoggerInPool (output vhFcComponent).
<M-4 run FinishUnitTest
(input iiDebugLevel (iiDebugLevel),
input {&TARGETPROCEDURE}:unique-id (iiSessionUID)) in tLogger>
end.
viSessionDebugLevel = iiDebugLevel.
run SetDebugLevelInPool (iiDebugLevel, viFcCurrentInstanceId, no).
<M-1 run SetIntegerValue
(input 'SessionDebugLevel':U (icName),
input iiDebugLevel (iiValue),
output viFcReturnSuper (oiReturnStatus)) in Session>
/* ================================================================= */
/* Initialise unit test on first activate. */
/* ================================================================= */
if (iiDebugLevel mod 64) > 31
and (viOldLevel mod 64) < 32
then do:
run StartLoggerInPool (output vhFcComponent).
<M-2 run InitialiseUnitTest () in tLogger>
end.
/* ================================================================= */
/* Copy debug level to the global session. */
/* ================================================================= */
if vcGlobalSessionId <> ""
and vcGlobalSessionId <> ?
then do:
<M-97 run StartPersistence
(output vhFcComponent (ohPersistence),
output viFcReturnSuper (oiReturnStatus)) in Session>
vcQuery = "for each fcSession where fcSession.GlobalSessionId = '" + vcGlobalSessionId + "'".
<M-21 run WriteDirect
(input 'fcSession' (icTableName),
input vcQuery (icPrepare),
input 'GlobalSessionDebugLevel' (icFieldList),
input 'i' (icFieldListDataTypes),
input string (visessionDebugLevel) (icAbsolute),
input '' (icIncremental),
input {&TARGETPROCEDURE} (ihClass),
input vcUserLogin (icUserLogin),
output viFcReturnSuper (oiReturnStatus)) in Progress>
end.