Page 1 of 1

XPRIM Tracing

Posted: Thu Apr 28, 2022 10:55 am
by jimwatterson
search.php?keywords=LANSA_XLIB_CONFIG&s ... e987b49717

Contains a reference to LANSA_XLIB_TRACEPATH

Anybody know what this does?

Re: XPRIM Tracing

Posted: Thu Apr 28, 2022 12:05 pm
by Dino
Hi Jim,

You were a click away to find it:
viewtopic.php?f=3&t=2499&p=7288&hilit=L ... PATH#p7288

it is used to log testing when testing restful for example or json.

I like to use it for example like this:

Code: Select all

Define_Com Class(#XPRIM_OSUtil) Name(#OSUtil)
If (*OSAPI = "IBMI")
#OSUtil.SetEnvironmentVariable Name('LANSA_XLIB_CONFIG') Value('/tmp/lansaxlib.configas400.json')
#OSUtil.SetEnvironmentVariable Name('LANSA_XLIB_TRACEPATH') Value('/LANSA_G14PGMLIB/tmp/log.txt')
Else
#OSUtil.SetEnvironmentVariable Name('LANSA_XLIB_CONFIG') Value('c:\temp\lansaxlib.config.json')
#OSUtil.SetEnvironmentVariable Name('LANSA_XLIB_TRACEPATH') Value('c:\temp\log.txt')
Endif
and you need to have the json files and folders created.

Re: XPRIM Tracing

Posted: Thu Apr 28, 2022 1:24 pm
by BrendanB
you might also refer to:

viewtopic.php?f=3&t=2578#p7604

which details a way of handling tracing for each request into a seperate IFS directory...

this can allow you to delete if successful, keep it otherwise... (so you can sort of do what the jsm *ERROR tracing does).

Re: XPRIM Tracing

Posted: Thu Apr 28, 2022 2:13 pm
by jimwatterson
I can see lots of information about LANSA_XLIB_CONFIG which I have been using for a while now - its LANSA_XLIB_TRACEPATH that I'm in the dark about.

The value set by CONFIG points to a file that shows where the trace data should be stored.

OSUtil.SetEnvironmentVariable Name('LANSA_XLIB_TRACEPATH') Value('c:\temp\log.txt')

What goes into log.txt?

Re: XPRIM Tracing

Posted: Fri Apr 29, 2022 9:11 am
by Dino
Hi Jim

Does not look like much information comes there or maybe i really need to break the execution of my restful to get something more interesting.

for example i got this running twice a restful request in the ibm:

Code: Select all

 Browse : /lansa_g14pgmlib/tmp/log.txt           
 Record :       1   of       4 by  18            
 Control :                                       
                                                 
....+....1....+....2....+....3....+....4....+....
 ************Beginning of data**************     
Status code = 200                                
Success status code = 1                          
Status code = 200                                
Success status code = 1                          
 ************End of Data********************     
I have not been able to generate anything with that in windows, so maybe just ibm.

Re: XPRIM Tracing

Posted: Fri Apr 29, 2022 2:29 pm
by jimwatterson
Nothing too useful there! Ag well, thanks for responding.