That is a good suggestion. I have been thinking of another extension to the asynTrace utility, which is an ASYN_TRACE_WARNING bit. This would be used for messages whose severity is between ASYN_TRACE_ERROR and ASYN_TRACE_FLOW.
How about adding 3 more bits to the asyn trace mask:
ASYN_TRACE_WARNING
ASYN_TRACE_SHOW_PORT - display the port/addr information (=1 by default)
ASYN_TRACE_SHOW_TIME - display the timestamp (=1 by default)
Mark
________________________________
From: [email protected] [[email protected]] on behalf of [email protected] [[email protected]]
Sent: Wednesday, April 24, 2013 3:51 AM
To: [email protected]
Subject: asynPrint to print asyn port name
Hello,
When writing asyn drivers I find myself using plenty of asynPrint calls to trace execution, debug etc. For each call I often find myself adding the current drivers asyn portname - and also often the asyn address.
The reason that I add the asyn port name to the asynPrint is of course to allow quickly identifying which asyn port is spewing out the message. In particular on operational systems with many devices and asyn drivers I usually have ASYN_TRACE_ERROR enabled by default - and then struggle to figure out which driver produced the error message.
Would it be possible to add printing of the asyn port name - and possibly the address - to the asynPrint call by default?
I think the relevant bit of code is in asyn/asynDriver/asynManger.c - but the code there is rather more complex than I had imagined... :-)
Cheers,
Ulrik
--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom