LogStatus

This parameter allows to control the activity status of a debug session within the PCAN-Basic API.

  Note

If the logging status is set to On before having configured a destination path for the log file or without having configured the information to be logged, then the log process will start with its default values, which equates to the log file being placed in the folder where the calling process is located, logging only any internal exception.

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

This parameter can be activated or deactivated. Accepts values of type ParameterValueActivation.

Default Value

The default logging status is Off. After switching it On, logging stays active until it is expressly deactivated.

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 deactivate a debug session:

C#
if (Api.SetValue(PcanChannel.None, PcanParameter.LogStatus, ParameterValue.Activation.Off) == PcanStatus.OK)
    Console.WriteLine("The logging session was successfully disabled.");
else
    Console.WriteLine("Error disabling a log session.");

See Also