35: l_session varchar2(256);
36: l_message VARCHAR2(2000);
37: --Bug 3559334 fix. Variable not used in code, but resulting in
38: --extra calls to fnd api.
39: --l_debug number := NVL(FND_PROFILE.VALUE('INV_DEBUG_TRACE'),0);
40: BEGIN
41: -- Since the forms-server and MWA server recycles database connections
42: -- we need to always check for debug profiles values and see if they
43: -- are different from the values with which it was initialized earlier. If
44: -- different then reinitialize the debug variables
45: IF g_maintain_log_profile AND g_trace_on IS NOT NULL THEN
46: l_dbgpath := g_dbgpath;
47: ELSE
48: g_trace_on := nvl(fnd_profile.value('INV_DEBUG_TRACE'),0);
49: l_dbgpath := fnd_profile.value('INV_DEBUG_FILE') ;
50: if (g_conc_request_id > 0) then
51: g_maintain_log_profile := TRUE;
52: end if;
45: IF g_maintain_log_profile AND g_trace_on IS NOT NULL THEN
46: l_dbgpath := g_dbgpath;
47: ELSE
48: g_trace_on := nvl(fnd_profile.value('INV_DEBUG_TRACE'),0);
49: l_dbgpath := fnd_profile.value('INV_DEBUG_FILE') ;
50: if (g_conc_request_id > 0) then
51: g_maintain_log_profile := TRUE;
52: end if;
53:
54: END IF;
55:
56: if ((g_trace_on = 1) AND (l_dbgpath <> g_dbgpath) ) then
57: g_dbgpath := l_dbgpath;
58: g_cp_flag := NVL(fnd_profile.value('CONC_REQUEST_ID'), 0) ;
59: if (g_trace_on = 1) then
60: select to_char(sysdate, 'DD-MON-YY:HH.MI.SS'),userenv('SESSIONID') into l_errmsg,l_session from dual;
61: g_dbg_lvl := fnd_profile.value('INV_DEBUG_LEVEL') ;
62:
57: g_dbgpath := l_dbgpath;
58: g_cp_flag := NVL(fnd_profile.value('CONC_REQUEST_ID'), 0) ;
59: if (g_trace_on = 1) then
60: select to_char(sysdate, 'DD-MON-YY:HH.MI.SS'),userenv('SESSIONID') into l_errmsg,l_session from dual;
61: g_dbg_lvl := fnd_profile.value('INV_DEBUG_LEVEL') ;
62:
63: if ( g_cp_flag > 0 ) then
64: FND_FILE.put_line(FND_FILE.LOG, ' ******** New Session:'||l_session||'****'||l_errmsg||' **********');
65: end if;