f2s_trace_on

Applies to: Oracle, MS SQL, MySql/MariaDB, PostgreSQL Drivers

Syntax

f2s_trace_on to {fileName}  [{Detail_Level}]

Parameter

Description

filename

The file name for the trace output.

Description This command enables driver level tracing to the specified file. Enabling trace on an application and using it in conjunction with f2s_write_trace_ln is a good way to study particular problems you encounter in the driver. f2s_write_trace_ln allows you to insert sections of your code into the trace file. This command can also set the trace to three different levels, allowing different amounts of information to be logged. Note that trace files can become very large so it is good practice to only turn them on when specifically needed.

The following trace levels are available. Each level includes the previous level’s information.

Detail_Level

TRACE_LEVEL

Logs

ERROR_LEVEL

-1

Errors and warnings only.

DEBUG_LEVEL (default)

0

All the database calls issued by the application (like FINDs, SAVEs and DELETEs, LOGIN, LOGOUT) and the embedded SQL calls, along with the call parameters.

DETAIL_LEVEL1

1

Information about the MOVE commands from/to file field buffers and the calls to the Get_Attribute and Set_Attribute commands.

DETAIL_LEVEL2

2

Text file generation through the driver.

DETAIL_LEVEL3

3

All calls to the driver and when they start and when they finish.

Example
 String sTableName
 Boolean bTableExists
 f2s_trace_on to "C:\Users\[USERNAME]\Documents\log.txt" DETAIL_LEVEL3
 f2s_check_sql_table_exists  "Customer" "dbo" "OrderEntry" to bTableExists
 f2s_write_trace_ln ("Customer Table exists:" * String(bTableExists))
 f2s_trace_off

Related Commands

Replaces: ENABLE_TRACE_ON