Skip to content

Commit

Permalink
#25: Add client_info to logger
Browse files Browse the repository at this point in the history
  • Loading branch information
martindsouza committed Mar 6, 2015
1 parent aa32c69 commit 1b3ebb6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/packages/logger.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -2514,7 +2514,8 @@ as
call_stack, unit_name, line_no ,
scn,
extra,
sid
sid,
client_info
)
values(
po_id, p_logger_level, l_text,
Expand All @@ -2525,7 +2526,8 @@ as
p_call_stack, upper(p_unit_name), p_line_no,
null,
l_extra,
to_number(sys_context('userenv','sid'))
to_number(sys_context('userenv','sid')),
sys_context('userenv','client_info')
);

-- #46 Plugin support
Expand Down
5 changes: 5 additions & 0 deletions source/tables/logger_logs.sql
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,14 @@ create table logger_logs(
-- #51
l_new_col.column_name := 'SID';
l_new_col.data_type := 'NUMBER';
l_new_cols(l_new_cols.count+1) := l_new_col;

-- #25
l_new_col.column_name := 'CLIENT_INFO';
l_new_col.data_type := 'VARCHAR2(64)'; -- taken from v$session.client_info
l_new_cols(l_new_cols.count+1) := l_new_col;


for i in 1 .. l_new_cols.count loop
select count(1)
into l_count
Expand Down

0 comments on commit 1b3ebb6

Please sign in to comment.