LogConfigure

This parameter is used to configure the debug information to be included in the log file generated in a debug session within the PCAN-Basic API. It can be used when only specific debug information is desired.

Availability

It is available since PCAN-Basic version 1.0.0.

Supported By

  • None: Logging parameters are used globally, i.e., they are not tied to a specific PCAN Channel, but to a specific process.

Access Mode

This parameter is read/write. It can be configured and retrieved.

Possible Values

The information to log is configured as a numeric “flag” value, that matches the fields defined within the type ParameterValueLog.

Default Value

The default value of this parameter is to log only internal exceptions (Default) that are generated in the native PCAN-Basic library.

Initialization Status

Get: Not relevant since this parameter is not channel dependent.

Set: Not relevant since this parameter is not channel dependent.

Example

The following code shows how to configure the information to be logged in a debug session:

C#
if (Api.SetValue(PcanChannel.None, PcanParameter.LogConfigure, ParameterValue.Log.FunctionEntries | ParameterValue.Log.FunctionExits) == PcanStatus.OK)
    Console.WriteLine("The log has been successfully configured to record information on entering and leaving API calls.");
else
    Console.WriteLine("Error configuring a log session.");

See Also