IBM FileNet P8, Version 5.2.1            

LogSample

This sample demonstrates how to write the default event log record information to a file.

Run the sample by entering a command similar to the following example:
    java LogSample username password server_name:port_number/connectionPoint_name 
        output_filename

For more information, see the comments in the sample source. The samples are supplied in the Developer samples section of the IBM® FileNet® P8 Platform publication library.

See also Running the API Samples.

Methods

General descriptions of the LogSample methods follow:

main()

The main method uses common techniques for validating and defaulting argument values. The default value for the log output file is LogSample.out. Main() constructs and passes VWSession and sample Logger class objects to the constructor. Main() handles the login and logoff for the session with the login() and logoff() methods of the sample SessionHelper class. It also provides workflow logging with an instance of the sample Logger class.

Logsample()

The LogSample constructor notifies the user of its work (by using the sample Logger.logAndDisplay), gets the default event log (by using VWSession.fetchEventLog), gets a VWLogQuery object (by using VWLog.startQuery), and iteratively gets the VWLogElement objects (by using VWLogQuery.next). It then displays VWLogElement information (by using VWLogElement.getFieldnames, VWLogElement.getFieldValue, and the sample Logger.log).



Last updated: March 2016
logsample.htm

© Copyright IBM Corporation 2016.