DBA Data[Home] [Help]

PACKAGE: APPS.OKL_DEBUG_PUB

Source


1 PACKAGE OKL_DEBUG_PUB AUTHID CURRENT_USER as
2 /* $Header: OKLPDEGS.pls 115.2 2003/01/28 12:44:32 rabhupat noship $ */
3 -- Start of Comments
4 -- Package name     : OKL_DEBUG_PUB
5 -- Purpose          :
6 -- History          :
7 -- NOTE             :
8 -- End of Comments
9 
10 
11     G_PKG_NAME      CONSTANT    VARCHAR2(15):=  'OKL_DEBUG_PUB';
12     G_Debug_Level   NUMBER := to_number(nvl(
13    		                      fnd_profile.value('OKL_DEBUG_LEVEL'), '0'));
14     G_DIR           Varchar2(255)      :=
15                                fnd_profile.value('UTL_FILE_DIR');
16     G_FILE          Varchar2(255)      := null;
17     G_FILE_PTR      utl_file.file_type;
18 /* Inserted by SPILLAIP Begin*/
19   g_session_id  Varchar2(255):= OKC_API.G_MISS_CHAR;
20   g_profile_log_level Number := 0;
21 /* Inserted by SPILLAIP END*/
22 
23 /* Name   OpenFile
24 ** It Opens the file if given , else creates a new file
25 */
26 Function  OpenFile(P_file in varchar2 default null) return varchar2;
27 
28 
29 /* Name   LogMessage
30 ** Purpose To add a debugging message. This message will be placed in
31 ** the file only if the debug level is greater than the g_debug_level
32 ** which is based on a profile
33 */
34 PROCEDURE LogMessage(debug_msg in Varchar2,
35                      debug_level in Number default 10,
36                      print_date in varchar2 default 'N');
37 
38 
39 /* Name SetDebugLevel (p_debug_level in number);
40 ** Set g_debug_level to the desired one if running outside of application
41 ** since the debug_level is set through a profile
42 */
43 Procedure SetDebugLevel(p_debug_level in number);
44 
45 Procedure SetDebugFileDir(P_FILEDIR IN VARCHAR2);
46 
47 /*Inserted by SPILLAIP BEGIN*/
48 --
49 --Function to check if the debug is enabled in the System profile.
50 FUNCTION CHECK_LOG_ENABLED
51   RETURN varchar2;
52 
53 --
54 --Function to check if particular module is enabled for a given level
55 --Only on success of this function, procedure log_debug can be called.
56 --
57 FUNCTION CHECK_LOG_ON
58   ( p_module IN varchar2,
59     p_level IN number)
60    RETURN  boolean;
61 
62 PROCEDURE set_connection_context;
63 
64 --
65 --Procedure to log debug messages using FND_LOG. Debug messages will be
66 --logged only if the debg level in fnd_profile is less than the specified
67 --level during the call of this procedure.
68 --
69 
70 PROCEDURE LOG_DEBUG
71   ( p_log_level IN number,
72     p_module IN varchar2,
73     p_message IN varchar2);
74 /*Inserted by SPILLAIP END*/
75 END OKL_DEBUG_PUB;