DBA Data[Home] [Help]

PACKAGE BODY: APPS.FA_UTIL_PUB

Source


1 PACKAGE BODY FA_UTIL_PUB as
2 /* $Header: FAPUTILB.pls 120.3 2009/03/27 05:17:34 bridgway ship $   */
3 
4  g_log_statement_level      CONSTANT NUMBER   := FND_LOG.LEVEL_STATEMENT;
5  g_log_procedure_level      CONSTANT NUMBER   := FND_LOG.LEVEL_PROCEDURE;
6  g_log_event_level          CONSTANT NUMBER   := FND_LOG.LEVEL_EVENT ;
7  g_log_exception_level      CONSTANT NUMBER   := FND_LOG.LEVEL_EXCEPTION;
8  g_log_error_level          CONSTANT NUMBER   := FND_LOG.LEVEL_ERROR;
9  g_log_unexpected_level     CONSTANT NUMBER   := FND_LOG.LEVEL_UNEXPECTED;
10  g_log_runtime_level        NUMBER   := FND_LOG.G_CURRENT_RUNTIME_LEVEL;
11 
12  g_print_debug              boolean ;
13 
14 FUNCTION get_log_level_rec
15    (x_log_level_rec         OUT NOCOPY FA_API_TYPES.log_level_rec_type) RETURN
16 BOOLEAN IS
17 
18 begin
19 
20    -- needed to initialze the profile and release caches first
21    if not fa_cache_pkg.fazprof then
22       null;
23    end if;
24 
25    g_log_runtime_level := FND_LOG.G_CURRENT_RUNTIME_LEVEL;
26    x_log_level_rec.statement_level :=
27                g_log_statement_level >= g_log_runtime_level;
28    x_log_level_rec.procedure_level :=
29                g_log_procedure_level >= g_log_runtime_level;
30    x_log_level_rec.event_level :=
31                g_log_event_level >= g_log_runtime_level;
32    x_log_level_rec.exception_level :=
33                g_log_exception_level >= g_log_runtime_level;
34    x_log_level_rec.error_level :=
35                g_log_error_level >= g_log_runtime_level;
36    x_log_level_rec.unexpected_level :=
37                g_log_unexpected_level >= g_log_runtime_level;
38    x_log_level_rec.current_runtime_level := g_log_runtime_level;
39 
40    if (fa_cache_pkg.fazarel_release = 11) then
41 
42       -- intentional initialization here after the cache call
43       g_print_debug := fa_cache_pkg.fa_print_debug;
44 
45 
46       if (g_print_debug) then
47           x_log_level_rec.statement_level       := TRUE;
48           x_log_level_rec.current_runtime_level := g_log_statement_level;
49       else
50           x_log_level_rec.statement_level       := FALSE;
51           x_log_level_rec.current_runtime_level := g_log_exception_level;
52       end if;
53    end if;
54 
55    x_log_level_rec.initialized := TRUE;
56 
57    return TRUE;
58 end;
59 
60 END FA_UTIL_PUB ;