1 package body ZPB_LOG as
2 /* $Header: zpblog.plb 120.8 2007/12/04 15:30:57 mbhat ship $ */
3
4 procedure BUILD_MESSAGE (MESSAGE in VARCHAR2,
5 TOKEN_1_NAME in VARCHAR2 default NULL,
6 TOKEN_1_VALUE in VARCHAR2 default NULL,
7 TOKEN_2_NAME in VARCHAR2 default NULL,
8 TOKEN_2_VALUE in VARCHAR2 default NULL,
9 TOKEN_3_NAME in VARCHAR2 default NULL,
10 TOKEN_3_VALUE in VARCHAR2 default NULL,
11 TOKEN_4_NAME in VARCHAR2 default NULL,
12 TOKEN_4_VALUE in VARCHAR2 default NULL,
13 TOKEN_5_NAME in VARCHAR2 default NULL,
14 TOKEN_5_VALUE in VARCHAR2 default NULL)
15 is
16 l_tok_1_val varchar2(1000);
17 l_tok_2_val varchar2(1000);
18 l_tok_3_val varchar2(1000);
19 l_tok_4_val varchar2(1000);
20 l_tok_5_val varchar2(1000);
21
22 begin
23 FND_MESSAGE.SET_NAME ('ZPB', MESSAGE);
24 if (TOKEN_1_NAME is not null) then
25 l_tok_1_val:= substr(TOKEN_1_VALUE,1,1000);
26 FND_MESSAGE.SET_TOKEN(TOKEN_1_NAME, l_tok_1_val);
27 else
28 return;
29 end if;
30 if (TOKEN_2_NAME is not null) then
31 l_tok_2_val:= substr(TOKEN_2_VALUE,1,1000);
32 FND_MESSAGE.SET_TOKEN(TOKEN_2_NAME, l_tok_2_val);
33 else
34 return;
35 end if;
36 if (TOKEN_3_NAME is not null) then
37 l_tok_3_val:= substr(TOKEN_3_VALUE,1,1000);
38 FND_MESSAGE.SET_TOKEN(TOKEN_3_NAME, l_tok_3_val);
39 else
40 return;
41 end if;
42 if (TOKEN_4_NAME is not null) then
43 l_tok_4_val:= substr(TOKEN_4_VALUE,1,1000);
44 FND_MESSAGE.SET_TOKEN(TOKEN_4_NAME, l_tok_4_val);
45 else
46 return;
47 end if;
48 if (TOKEN_5_NAME is not null) then
49 l_tok_5_val:= substr(TOKEN_5_VALUE,1,1000);
50 FND_MESSAGE.SET_TOKEN(TOKEN_5_NAME, l_tok_5_val);
51 else
52 return;
53 end if;
54 end BUILD_MESSAGE;
55 -------------------------------------------------------------------------------
56 -- Error
57 --
58 -- Procedure to log BI Beans Erros.
59 --
60 --
61 -- IN:
62 -- MESSAGE - The Message coming from Bi Beans
63 --
64 -------------------------------------------------------------------------------
65 procedure ERROR (MESSAGE in VARCHAR2 )
66 is
67 l_Module varchar2(30) := 'ZPBBIBEANS';
68 begin
69
70 WRITE_EXCEPTION_UNTR (l_Module, MESSAGE);
71 end Error;
72
73 -------------------------------------------------------------------------------
74 -- FORMAT_REQUEST_MESSAGE
75 --
76 -- Procedure to format the message for the concurrent message log
77 -------------------------------------------------------------------------------
78 function FORMAT_REQUEST_MESSAGE (MODULE in VARCHAR2,
79 MESSAGE in VARCHAR2)
80 return VARCHAR2 is
81 begin
82 return MODULE||' ('||to_char(sysdate, 'HH24:MI:SS')||'): '||MESSAGE;
83 end FORMAT_REQUEST_MESSAGE;
84
85 -------------------------------------------------------------------------------
86 -- GET_DEBUGGING_LEVEL
87 --
88 -- Returns the debugging level. Used by CM.LOG in the AW
89 -- 'L' - Log all to log file (locally run)
90 -- 'C' - Log all to concurrent manager (executed from concurrent + developer)
91 -- 'N' - No extra logging (executed from Java, or production concurrent)
92 --
93 -------------------------------------------------------------------------------
94 function GET_DEBUGGING_LEVEL return varchar2
95 is
96 l_dev_mode varchar2(1);
97 l_conc_id number;
98 l_user varchar2(30);
99 l_ret varchar2(1);
100 begin
101 l_dev_mode := FND_PROFILE.VALUE ('FND_DEVELOPER_MODE');
102 l_conc_id := FND_GLOBAL.CONC_REQUEST_ID;
103 select osuser
104 into l_user
105 from v$session
106 where audsid = USERENV('SESSIONID');
107
108 if (l_user <> 'semops') then
109 l_ret := 'L';
110 elsif (l_dev_mode = 'Y' and l_conc_id <> -1) then
111 l_ret := 'C';
112 else l_ret := 'N';
113 end if;
114 -- Temporary until single instance:
115 l_ret := 'L';
116 return l_ret;
117 end GET_DEBUGGING_LEVEL;
118
119 -------------------------------------------------------------------------------
120 -- GET_LOGGING_LEVEL
121 --
122 -- Returns the logging level. Same as FND_LOG.G_CURRENT_RUNTIME_LEVEL, but
123 -- placed in a function for use in AW's
124 -------------------------------------------------------------------------------
125 function GET_LOGGING_LEVEL return number
126 is
127 begin
128 return FND_LOG.G_CURRENT_RUNTIME_LEVEL;
129 end GET_LOGGING_LEVEL;
130
131 -------------------------------------------------------------------------------
132 -- LOG_PLSQL_EXCEPTION
133 --
134 -- Logs a generic PL/SQL message stating the module and SQLERRM of an exception
135 -- that just occured. This must be called only if a valid PL/SQL exception
136 -- occurred.
137 --
138 -- IN: p_module - The module where the exception occurred
139 -- p_procedure - The procedure name where the exception occured
140 -- p_pop_message - True if the message stack should be cleared
141 -------------------------------------------------------------------------------
142 procedure LOG_PLSQL_EXCEPTION (p_module in VARCHAR2,
143 p_procedure in VARCHAR2,
144 p_pop_message in BOOLEAN) is
145 begin
146 if (FND_LOG.LEVEL_EXCEPTION >= FND_LOG.G_CURRENT_RUNTIME_LEVEL or
147 not p_pop_message) then
148
149 FND_MESSAGE.SET_NAME('FND','FND_AS_UNEXPECTED_ERROR');
150 FND_MESSAGE.SET_TOKEN('PKG_NAME',p_module);
151 FND_MESSAGE.SET_TOKEN('PROCEDURE_NAME',p_procedure);
152 FND_MESSAGE.SET_TOKEN('ERROR_TEXT',substr(SQLERRM, 1, 1000));
153
154 if (FND_LOG.LEVEL_EXCEPTION >= FND_LOG.G_CURRENT_RUNTIME_LEVEL and
155 fnd_global.conc_request_id = -1) then
156 FND_LOG.MESSAGE (FND_LOG.LEVEL_EXCEPTION,
157 'zpb.plsql.'||p_module||'.'||p_procedure,
158 p_pop_message);
159 end if;
160 end if;
161
162 end LOG_PLSQL_EXCEPTION;
163 -------------------------------------------------------------------------------
164 -- TRACE
165 --
166 -- Procedure to log BI Beans Errors and trace.
167 --
168 --
169 -- IN:
170 -- MESSAGE - The Message coming from Bi Beans
171 --
172 -------------------------------------------------------------------------------
173 procedure TRACE (MESSAGE in VARCHAR2 )
174 is
175 l_Module varchar2(30) := 'ZPBBIBEANS';
176 begin
177
178 WRITE_EVENT (l_Module, MESSAGE);
179 end TRACE;
180
181
182 -------------------------------------------------------------------------------
183 -- WRITE
184 --
185 -- Procedure to log at the PROCEDURE level (2). Log here to mark entering and
186 -- exiting of procedures, as well as input and output parameters from those
187 -- procedures.
188 --
189 -- IN:
190 -- MODULE - The calling package and procedure. Example:
191 -- "zpb_aw_write_back.submit_writeback_request"
192 -- MESSAGE - The Message to be logged (non-translated)
193 --
194 -------------------------------------------------------------------------------
195 procedure WRITE (MODULE in VARCHAR2,
196 MESSAGE in VARCHAR2)
197 is
198 l_user varchar2(30);
199 begin
200 if (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
201 if (fnd_global.conc_request_id = -1) then
202 FND_LOG.STRING (FND_LOG.LEVEL_PROCEDURE,
203 'zpb.plsql.'||MODULE,
204 MESSAGE);
205 else
206 FND_FILE.PUT_LINE (FND_FILE.LOG,
207 FORMAT_REQUEST_MESSAGE(MODULE, MESSAGE));
208 end if;
209 end if;
210 end WRITE;
211
212 -------------------------------------------------------------------------------
213 -- WRITE_ERROR
214 --
215 -- Procedure to log at the ERROR level (5). Log here when any user-errors
216 -- or validation errors occur.
217 --
218 -- IN:
219 -- MODULE - The calling package and procedure. Example:
220 -- "zpb_aw_write_back.submit_writeback_request"
221 -- MESSAGE_NAME - The Message name defined in FND_MESSAGES table
222 -- TOKEN_# - Any tokens required in the message. Tokens go as a
223 -- a name/value. Omit if not applicable
224 -- POP_MESSAGE - True if the message will not be used again. False means
225 -- you must explicitly clear the message.
226 --
227 -------------------------------------------------------------------------------
228 procedure WRITE_ERROR (MODULE in VARCHAR2,
229 MESSAGE_NAME in VARCHAR2,
230 TOKEN_1_NAME in VARCHAR2,
231 TOKEN_1_VALUE in VARCHAR2,
232 TOKEN_2_NAME in VARCHAR2,
233 TOKEN_2_VALUE in VARCHAR2,
234 TOKEN_3_NAME in VARCHAR2,
235 TOKEN_3_VALUE in VARCHAR2,
236 TOKEN_4_NAME in VARCHAR2,
237 TOKEN_4_VALUE in VARCHAR2,
238 TOKEN_5_NAME in VARCHAR2,
239 TOKEN_5_VALUE in VARCHAR2,
240 POP_MESSAGE in BOOLEAN)
241 is
242 l_user varchar2(30);
243 begin
244 if (FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL or
245 not pop_message) then
246 BUILD_MESSAGE (MESSAGE_NAME,
247 TOKEN_1_NAME,
248 TOKEN_1_VALUE,
249 TOKEN_2_NAME,
250 TOKEN_2_VALUE,
251 TOKEN_3_NAME,
252 TOKEN_3_VALUE,
253 TOKEN_4_NAME,
254 TOKEN_4_VALUE,
255 TOKEN_5_NAME,
256 TOKEN_5_VALUE);
257 end if;
258 if (FND_LOG.LEVEL_ERROR >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
259 if (fnd_global.conc_request_id = -1) then
260 FND_LOG.MESSAGE (FND_LOG.LEVEL_ERROR,
261 'zpb.plsql.'||MODULE,
262 POP_MESSAGE);
263 else
264 FND_FILE.PUT_LINE (FND_FILE.LOG, FND_MESSAGE.GET);
265 if (POP_MESSAGE) then
266 FND_MESSAGE.CLEAR;
267 end if;
268 end if;
269 end if;
270 end WRITE_ERROR;
271
272 -------------------------------------------------------------------------------
273 -- WRITE_EVENT
274 --
275 -- Procedure to log at the EVENT level (3). Log here when any major event
276 -- occurs.
277 --
278 -- IN:
279 -- MODULE - The calling package and procedure. Example:
280 -- "zpb_aw_write_back.submit_writeback_request"
281 -- MESSAGE - The message to be logged (not translated)
282 --
283 -------------------------------------------------------------------------------
284 procedure WRITE_EVENT (MODULE in VARCHAR2,
285 MESSAGE in VARCHAR2)
286 is
287 l_user varchar2(30);
288 begin
289 if (FND_LOG.LEVEL_EVENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
290 if (fnd_global.conc_request_id = -1) then
291 FND_LOG.STRING (FND_LOG.LEVEL_EVENT,
292 'zpb.plsql.'||MODULE,
293 MESSAGE);
294 else
295 FND_FILE.PUT_LINE (FND_FILE.LOG,
296 FORMAT_REQUEST_MESSAGE(MODULE, MESSAGE));
297 end if;
298 end if;
299 end WRITE_EVENT;
300
301 -------------------------------------------------------------------------------
302 -- WRITE_EVENT_TR
303 --
304 -- Procedure to log at the EVENT level (3). Log here when any major event
305 -- occurs. This event message is translated. If used in a concurrent process,
306 -- these messages will be logged to the Request Log.
307 --
308 --
309 -- IN:
310 -- MODULE - The calling package and procedure. Example:
311 -- "zpb_aw_write_back.submit_writeback_request"
312 -- MESSAGE_NAME - The Message name defined in FND_MESSAGES table
313 -- TOKEN_# - Any tokens required in the message. Tokens go as a
314 -- a name/value. Omit if not applicable
315 -- POP_MESSAGE - True if the message will not be used again. False means
316 -- you must explicitly clear the message.
317 --
318 -------------------------------------------------------------------------------
319 procedure WRITE_EVENT_TR (MODULE in VARCHAR2,
320 MESSAGE_NAME in VARCHAR2,
321 TOKEN_1_NAME in VARCHAR2,
322 TOKEN_1_VALUE in VARCHAR2,
323 TOKEN_2_NAME in VARCHAR2,
324 TOKEN_2_VALUE in VARCHAR2,
325 TOKEN_3_NAME in VARCHAR2,
326 TOKEN_3_VALUE in VARCHAR2,
327 TOKEN_4_NAME in VARCHAR2,
328 TOKEN_4_VALUE in VARCHAR2,
329 TOKEN_5_NAME in VARCHAR2,
330 TOKEN_5_VALUE in VARCHAR2,
331 POP_MESSAGE in BOOLEAN)
332 is
333 l_user varchar2(30);
334 begin
335
336 if (FND_LOG.LEVEL_EVENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL or
337 not pop_message) then
338 BUILD_MESSAGE (MESSAGE_NAME,
339 TOKEN_1_NAME,
340 TOKEN_1_VALUE,
341 TOKEN_2_NAME,
342 TOKEN_2_VALUE,
343 TOKEN_3_NAME,
344 TOKEN_3_VALUE,
345 TOKEN_4_NAME,
346 TOKEN_4_VALUE,
347 TOKEN_5_NAME,
348 TOKEN_5_VALUE);
349 end if;
350 if (FND_LOG.LEVEL_EVENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
351 if (fnd_global.conc_request_id = -1) then
352 FND_LOG.MESSAGE (FND_LOG.LEVEL_EVENT,
353 'zpb.plsql.'||MODULE,
354 POP_MESSAGE);
355 else
356 FND_FILE.PUT_LINE (FND_FILE.LOG, FND_MESSAGE.GET);
357 if (POP_MESSAGE) then
358 FND_MESSAGE.CLEAR;
359 end if;
360 end if;
361 end if;
362 end WRITE_EVENT_TR;
363
364 -------------------------------------------------------------------------------
365 -- WRITE_EXCEPTION_UNTR
366 --
367 -- Procedure to log at the EXCEPTION level (3). Log here when any major exception
368 -- occurs.
369 --
370 -- IN:
371 -- MODULE - The calling package and procedure. Example:
372 -- "zpb_aw_write_back.submit_writeback_request"
373 -- MESSAGE - The message to be logged (not translated)
374 --
375 -------------------------------------------------------------------------------
376 procedure WRITE_EXCEPTION_UNTR (MODULE in VARCHAR2,
377 MESSAGE in VARCHAR2)
378 is
379 begin
380 if (FND_LOG.LEVEL_EXCEPTION >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
381 if (fnd_global.conc_request_id = -1) then
382 FND_LOG.STRING (FND_LOG.LEVEL_EXCEPTION,
383 'zpb.plsql.'||MODULE,
384 MESSAGE);
385 else
386 FND_FILE.PUT_LINE (FND_FILE.LOG,
387 FORMAT_REQUEST_MESSAGE(MODULE, MESSAGE));
388 end if;
389 end if;
390 end WRITE_EXCEPTION_UNTR;
391
392
393 -------------------------------------------------------------------------------
394 -- WRITE_EXCEPTION
395 --
396 -- Procedure to log at the EXCEPTION level (4). Log here when any non-critical
397 -- exception occurs in the code.
398 --
399 --
400 -- IN:
404 -- TOKEN_# - Any tokens required in the message. Tokens go as a
401 -- MODULE - The calling package and procedure. Example:
402 -- "zpb_aw_write_back.submit_writeback_request"
403 -- MESSAGE_NAME - The Message name defined in FND_MESSAGES table
405 -- a name/value. Omit if not applicable
406 -- POP_MESSAGE - True if the message will not be used again. False means
407 -- you must explicitly clear the message.
408 --
409 -------------------------------------------------------------------------------
410 procedure WRITE_EXCEPTION (MODULE in VARCHAR2,
411 MESSAGE_NAME in VARCHAR2,
412 TOKEN_1_NAME in VARCHAR2,
413 TOKEN_1_VALUE in VARCHAR2,
414 TOKEN_2_NAME in VARCHAR2,
415 TOKEN_2_VALUE in VARCHAR2,
416 TOKEN_3_NAME in VARCHAR2,
417 TOKEN_3_VALUE in VARCHAR2,
418 TOKEN_4_NAME in VARCHAR2,
419 TOKEN_4_VALUE in VARCHAR2,
420 TOKEN_5_NAME in VARCHAR2,
421 TOKEN_5_VALUE in VARCHAR2,
422 POP_MESSAGE in BOOLEAN)
423 is
424 l_user varchar2(30);
425 begin
426 if (FND_LOG.LEVEL_EXCEPTION >= FND_LOG.G_CURRENT_RUNTIME_LEVEL or
427 not pop_message) then
428 BUILD_MESSAGE (MESSAGE_NAME,
429 TOKEN_1_NAME,
430 TOKEN_1_VALUE,
431 TOKEN_2_NAME,
432 TOKEN_2_VALUE,
433 TOKEN_3_NAME,
434 TOKEN_3_VALUE,
435 TOKEN_4_NAME,
436 TOKEN_4_VALUE,
437 TOKEN_5_NAME,
438 TOKEN_5_VALUE);
439 end if;
440 if (FND_LOG.LEVEL_EXCEPTION >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
441 if (fnd_global.conc_request_id = -1) then
442 FND_LOG.MESSAGE (FND_LOG.LEVEL_EXCEPTION,
443 'zpb.plsql.'||MODULE,
444 POP_MESSAGE);
445 else
446 FND_FILE.PUT_LINE (FND_FILE.LOG, FND_MESSAGE.GET);
447 if (POP_MESSAGE) then
448 FND_MESSAGE.CLEAR;
449 end if;
450 end if;
451 end if;
452 end WRITE_EXCEPTION;
453
454 -------------------------------------------------------------------------------
455 -- WRITE_STATEMENT
456 --
457 -- Procedure to log at the STATEMENT level (1). Log here for any low-level
458 -- messages, ie. for tracing or debugging
459 --
460 --
461 -- IN:
462 -- MODULE - The calling package and procedure. Example:
463 -- "zpb_aw_write_back.submit_writeback_request"
464 -- MESSAGE - The message to be logged (not translated)
465 --
466 -------------------------------------------------------------------------------
467 procedure WRITE_STATEMENT (MODULE in VARCHAR2,
468 MESSAGE in VARCHAR2)
469 is
470 l_user varchar2(30);
471
472 begin
473
474 if (FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
475 if (fnd_global.conc_request_id = -1) then
476 FND_LOG.STRING (FND_LOG.LEVEL_STATEMENT,
477 'zpb.plsql.'||MODULE,
478 MESSAGE);
479 else
480 FND_FILE.PUT_LINE (FND_FILE.LOG,
481 FORMAT_REQUEST_MESSAGE(MODULE, MESSAGE));
482 end if;
483 end if;
484 end WRITE_STATEMENT;
485 -------------------------------------------------------------------------------
486 -- WRITE_UNEXPECTED
487 --
488 -- Procedure to log at the UNEXPECTED level (6). Log here when any critical
489 -- exception occurs in the code. This will be alerted to system admins
490 --
491 --
492 -- IN:
493 -- MODULE - The calling package and procedure. Example:
494 -- "zpb_aw_write_back.submit_writeback_request"
495 -- MESSAGE_NAME - The Message name defined in FND_MESSAGES table
496 -- TOKEN_# - Any tokens required in the message. Tokens go as a
497 -- a name/value. Omit if not applicable
498 -- POP_MESSAGE - True if the message will not be used again. False means
499 -- you must explicitly clear the message.
500 --
501 -------------------------------------------------------------------------------
502 procedure WRITE_UNEXPECTED (MODULE in VARCHAR2,
503 MESSAGE_NAME in VARCHAR2,
504 TOKEN_1_NAME in VARCHAR2,
505 TOKEN_1_VALUE in VARCHAR2,
506 TOKEN_2_NAME in VARCHAR2,
507 TOKEN_2_VALUE in VARCHAR2,
508 TOKEN_3_NAME in VARCHAR2,
509 TOKEN_3_VALUE in VARCHAR2,
510 TOKEN_4_NAME in VARCHAR2,
511 TOKEN_4_VALUE in VARCHAR2,
512 TOKEN_5_NAME in VARCHAR2,
513 TOKEN_5_VALUE in VARCHAR2,
514 POP_MESSAGE in BOOLEAN)
515 is
516 l_user varchar2(30);
517 begin
518 if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL or
519 not pop_message) then
520 BUILD_MESSAGE (MESSAGE_NAME,
521 TOKEN_1_NAME,
522 TOKEN_1_VALUE,
523 TOKEN_2_NAME,
524 TOKEN_2_VALUE,
525 TOKEN_3_NAME,
526 TOKEN_3_VALUE,
527 TOKEN_4_NAME,
528 TOKEN_4_VALUE,
529 TOKEN_5_NAME,
530 TOKEN_5_VALUE);
531 end if;
532 if (FND_LOG.LEVEL_UNEXPECTED >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) then
533 if (fnd_global.conc_request_id = -1) then
534 FND_LOG.MESSAGE (FND_LOG.LEVEL_UNEXPECTED,
535 'zpb.plsql.'||MODULE,
536 POP_MESSAGE);
537 else
538 FND_FILE.PUT_LINE (FND_FILE.LOG, FND_MESSAGE.GET);
539 if (POP_MESSAGE) then
540 FND_MESSAGE.CLEAR;
541 end if;
542 end if;
543 end if;
544 end WRITE_UNEXPECTED;
545
546 -------------------------------------------------------------------------------
547 -- WRITE_TO_CONCMGR_LOG
548 --
549 -- Procedure to log informational, non-translated messages to the concurrent log.
550 --
551 -- IN:
552 -- MESSAGE - The Message to be logged (non-translated)
553 --
554 -------------------------------------------------------------------------------
555 procedure WRITE_TO_CONCMGR_LOG (MESSAGE in VARCHAR2)
556 is
557 begin
558 FND_FILE.PUT_LINE (FND_FILE.LOG,
559 MESSAGE);
560 end WRITE_TO_CONCMGR_LOG;
561
562 -------------------------------------------------------------------------------
563 -- WRITE_TO_CONCMGR_LOG_TR
564 --
565 -- Procedure to log informational translated messages to the concurrent log.
566 --
567 -- IN:
568 -- MESSAGE_NAME - The Message name defined in FND_MESSAGES table
569 -- TOKEN_# - Any tokens required in the message. Tokens go as a
570 -- a name/value. Omit if not applicable
571 -- POP_MESSAGE - True if the message will not be used again. False means
572 -- you must explicitly clear the message.
573 --
574 -------------------------------------------------------------------------------
575 procedure WRITE_TO_CONCMGR_LOG_TR(MESSAGE_NAME in VARCHAR2,
576 TOKEN_1_NAME in VARCHAR2 default NULL,
577 TOKEN_1_VALUE in VARCHAR2 default NULL,
578 TOKEN_2_NAME in VARCHAR2 default NULL,
579 TOKEN_2_VALUE in VARCHAR2 default NULL,
580 TOKEN_3_NAME in VARCHAR2 default NULL,
581 TOKEN_3_VALUE in VARCHAR2 default NULL,
582 TOKEN_4_NAME in VARCHAR2 default NULL,
583 TOKEN_4_VALUE in VARCHAR2 default NULL,
584 TOKEN_5_NAME in VARCHAR2 default NULL,
585 TOKEN_5_VALUE in VARCHAR2 default NULL,
586 POP_MESSAGE in BOOLEAN default TRUE)
587 is
588 begin
589
590 BUILD_MESSAGE (MESSAGE_NAME,
591 TOKEN_1_NAME,
592 TOKEN_1_VALUE,
593 TOKEN_2_NAME,
594 TOKEN_2_VALUE,
595 TOKEN_3_NAME,
596 TOKEN_3_VALUE,
597 TOKEN_4_NAME,
598 TOKEN_4_VALUE,
599 TOKEN_5_NAME,
600 TOKEN_5_VALUE);
601
602 FND_FILE.PUT_LINE (FND_FILE.LOG, to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS') ||' ' || FND_MESSAGE.GET);
603 if (POP_MESSAGE) then
604 FND_MESSAGE.CLEAR;
605 end if;
606
607
608 end WRITE_TO_CONCMGR_LOG_TR;
609
610 end ZPB_LOG;