How do I record a console log

How do I record a console log

book

Article ID: KB0074105

calendar_today

Updated On:

Products Versions
TIBCO Streaming 7

Description

StreamBase Support has requested a console log from executing a StreamBase 7.x application. How do I create one?

Issue/Introduction

Command steps for creating a console log file from the command-line or within StreamBase Studio

Resolution

Applications may be run from StreamBase Studio or the command-line, and their output may be modified by a custom logging configuration.

NOTE: For TIBCO Streaming 10.x or later versions, obtain a node "snapshot" described elsewhere.

 

A. To get the SB Studio Console view output as a file...

1) Create a Run Configuration for the application

1.1 Open the top level .sbapp in the editor
1.2 Use menu: Run > Run Configurations...
1.3 Double-click: StreamBase Application in the left pane of the dialog
1.4 Click Browse and select the open .sbapp

2) Set on the Common tab, Standard Input and Output, to File

2.1 Click Workspace and select the .sbapp's Project folder, click OK
2.2 Append to the ${workspace_loc:/<project>}, /run.log

3) Save and run the configuration by clicking Apply and then Run (you may need to force it to run with Typecheck errors).

More information is available here:
  Help > Test/Debug Guide > Running Applications > Editing Launch Configurations
 

B. To get a console log from the command-line...

a. If using custom logging:

The server's sbd.sbconf file will have either:
  • <sysproperty name="logback.configurationFile" value="/path/to/logback.xml"/>
    or:
  • <sysproperty name="log4j.configuration" value="log4j.xml"/>
Read the logging configuration file to identify where the log file will be written and make sure there are no filters applied that would prevent debug messages from being written.

b. If not using custom logging:

Start your 'sbd' server normally, but with a redirect to a file (example):
  sbd -f sbd.sbconf app.sbapp >run.log 2>&1

The syntax "2>&1" causes the error output to also be recorded into the same file.

Send the run.log file back to Support as an attachment to the case.