How to user events into custom logs

How to user events into custom logs

book

Article ID: KB0081647

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization 7.0.5,7.0.6+

Description

How to user events into custom logs

Issue/Introduction

How to user events into custom logs

Resolution

Log() - This function is used to log custom event to CIS server logs.
Write the text you provide to the log file, with severity level INFO.

LogError()
Write the text you provide to the log file, with severity level ERROR.

LogMessageToFile()
Write the contents of a message to a file at a specified path (log folder).
E.g.
CALL log('Neelesh');
CALL logError('There is an error.');

declare foo XML;
set foo = '<msg>hello</msg>';
CALL /lib/services/LogMessageToFile(foo,'test.xml','APPEND','header','footer',false); 

cs_server.log 
INFO [WProcResult Invoker] 2016-04-14 11:05:45.459 -0700 LogProcedure - Neelesh
ERROR [WProcResult Invoker] 2016-04-14 11:11:57.446 -0700 LogErrorProcedure - There is an error.

test.xml in log directory
header
<msg>hello</msg>
footer