project BLF > class tLogger > method SetDebugLevel


Parameters


iiDebugLevelinputinteger
iiSessionIdinputinteger


Internal usage


BLF
method ComponentPool.SetDebugLevelInPool


program code (program1/tlogger.p)

viLoggerDebugLevel = iiDebugLevel.

if viLoggerDebugLevel = 0
then assign vcLogBusinessCodeFile   = ""
            vcLogDatabaseAccessFile = ""
            vcLogUTIntermediateFile = ""
            vcLogUnitTestFile       = "".
else do:
    if iiSessionId = 0
    or iiSessionId = ?
    then do:
        if opsys = "UNIX":U
        then do:
            input through "echo $PPID".
            import iiSessionId.
            input close.
            if iiSessionId = 0
            then do:
                create buffer vhConnBuffer for table "_MyConnection" in widget-pool "non-persistent" no-error.
                if vhConnBuffer <> ?
                then do:
                    vhConnBuffer:find-first ("",no-lock).
                    if vhConnBuffer:available
                    then iiSessionId = vhConnBuffer::_MyConn-Pid.
                    delete object vhConnBuffer.
                end.
            end.
        end.
        else do:
            <M-1 run Main () in Win32Lib>
            iiSessionId = <M-2 GetCurrentProcess () in Win32Lib>.
            run gipr_DeleteProcedure in vhFcComponent.
            delete procedure vhFcComponent.
        end.
    end.
    assign 
        vcSlash = (if opsys = "Win32":U then "~\":U else "/":U)
        vcLogBusinessCodeFile   = vcLoggerOutputFolder + vcSlash + "ct":U + string(iiSessionId) + ".log":U
        vcLogDatabaseAccessFile = vcLoggerOutputFolder + vcSlash + "ServerLog.csv":U
        vcLogUTIntermediateFile = vcLoggerOutputFolder + vcSlash + "ut":U + string(iiSessionId) + ".log":U
        vcLogUnitTestFile       = vcLoggerOutputFolder + vcSlash + "UnitTestReport.txt":U.
end.