How to generate debug logs for CA Secure Socket Adapter (CSAM) ?

Document ID : KB000010367
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

For debug purpose it could be interesting to generate debug logs for CA Secure Socket Adapter (CSAM) component. How to do this ?

 

Instructions:

Enable debug mode in CSAM

 

1- Open the SYSTEM environment variables window.

It could be opened with this command line :

rundll32 sysdm.cpl,EditEnvironmentVariables 

 

2- Add these 3 variables :

CSAM_DEBUG=YES

CSAM_SSL_DEBUG=YES

CSAM_LOG=%CSAM_SOCKADAPTER%\log\csam_debug.txt

Capture1.JPG

 

3- Open a new CMD command prompt and execute this command to check that the 3 added variables are present :

set CSAM

Capture2.JPG

 

4- Recycle caf, cam and csampmux :

caf stop

cam change disabled

camclose

csampmux stop

csampmux start

cam change auto

caf start

 

The file %CSAM_SOCKADAPTER%\log\csam_debug.txt should be created and growing containing debug information.

 

Remark :  

If the file %CSAM_SOCKADAPTER%\log\csam_debug.txt is not created but the 3 variables are present, a reboot of machine may be necessary

 

 

 

After a while the file csam_debug.txt could be very big (several GigaBytes). 

Once debug information are not necessary anymore it is better to disable the debug mode :

 

 

 

Disable debug mode in CSAM

 

1- Open the SYSTEM environment variables window.

It could be opened with this command line :

rundll32 sysdm.cpl,EditEnvironmentVariables 

 

2- Delete the 3 variables :

CSAM_DEBUG

CSAM_SSL_DEBUG

CSAM_LOG

 

 

3- Open a new CMD command prompt and execute this command to check that the 3 variables are not present anymore :

set CSAM

Capture3.JPG

 

 

4- Recycle caf, cam and csampmux :

caf stop

cam change disabled

camclose

csampmux stop

csampmux start

cam change auto

caf start

 

The file %CSAM_SOCKADAPTER%\log\csam_debug.txt could be deleted.

 

Remark :  

If the file %CSAM_SOCKADAPTER%\log\csam_debug.txt is created again but the 3 variables are not present anymore, a reboot of machine may be necessary.