XPRIM Tracing

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
jimwatterson
Posts: 56
Joined: Thu Jul 09, 2020 8:31 am

XPRIM Tracing

Post by jimwatterson »

search.php?keywords=LANSA_XLIB_CONFIG&s ... e987b49717

Contains a reference to LANSA_XLIB_TRACEPATH

Anybody know what this does?
User avatar
Dino
Posts: 472
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: XPRIM Tracing

Post 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.
BrendanB
Posts: 134
Joined: Tue Nov 24, 2015 10:29 am

Re: XPRIM Tracing

Post 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).
jimwatterson
Posts: 56
Joined: Thu Jul 09, 2020 8:31 am

Re: XPRIM Tracing

Post 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?
User avatar
Dino
Posts: 472
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: XPRIM Tracing

Post 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.
jimwatterson
Posts: 56
Joined: Thu Jul 09, 2020 8:31 am

Re: XPRIM Tracing

Post by jimwatterson »

Nothing too useful there! Ag well, thanks for responding.
Post Reply