Experimental Physics and Industrial Control System
Note that the asynTrace facility does not always use the errlogPrintf layer. The reason is that it allows redirecting output to a file at the level of (port, addr), so each device can be logging to a different file. If the output has been redirected then I/O is done with vfprintf(), not errlogPrintf().
One simple idea would be to add a bit to the asynTrace flags, ASYN_TRACE_NOREPEATS. The asynTrace facility could remember the previous error message for a particular pasynUser, and if the next one is the same (except for the time stamp) then the message would not be output.
This would make it easy for asyn drivers to adhere to the Dalesio rule with no changes to the driver at all, just a change in the startup script.
Mark
________________________________________
From: [email protected] [[email protected]] on behalf of Ralph Lange [[email protected]]
Sent: Wednesday, April 18, 2012 3:38 AM
To: [email protected]
Subject: Re: log message filter in Asyn
Hm...
so it is not really the same issue, as in Mark's case (I assume)
procServ is doing the logging while in your case (I assume) console is
doing it.
Which shows adding the filter to procServ or console is a bad idea, as
it would have to be reimplemented for every client people use to access
their IOCs.
Eric is safe when holding to his opinion, as there is no log server
involved in both cases.
Maybe the errlogPrintf layer should define a plugin API for such
filters, and allow adding filtering either general (for all loggers and
the console), or for each configured logger. (To allow no-filtering
connections to log servers that are ready to take all the crap.)
If I remember correctly, the Dalesio test (R) for drivers included
pulling and reconnecting the device cable from the IOC, and demanded
that the driver log each of these actions with exactly one log message,
and no secondary resulting messages inbetween.
With all due respect, Asyn would fail this badly.
Cheers,
~Ralph
On 17.04.2012 19:27, [email protected] wrote:
> Hi,
>
> We have the same issue that Mark described, in that we're using procServ along with conserver to log from our IOCs. I agree that filtering should be part of any log server. But I think there's a place for it in clients too. For example, we already do rate limiting of alarms from records using things like hysteresis fields.
>
> Yes, Asyn itself probably isn't the best place for it though.
>
> Cheers,
> Matt
>
> ________________________________________
> From: [email protected] [[email protected]] on behalf of Eric Norum [[email protected]]
> Sent: 17 April 2012 16:39
> To: [email protected] Talk
> Subject: Re: log message filter in Asyn
>
> On Apr 17, 2012, at 8:26 AM, Mark Rivers wrote:
>
>> You can also turn off asynTrace messages for a particular device with
>>
>> asynSetTraceMask(port, addr, 0)
>>
>> But I see the utility of what Matt is proposing. We use procServ to run our IOCs, both soft IOCs and vxWorks IOCs. On vxWorks the procServ is controlling a telnet session to an Ethernet terminal server, which is connected to the vxWorks console port. For logging we just use the log file capability of procServ, not a special logging program. If a device becomes unavailable the log file can quickly grow very large with asynTrace error messages.
>>
>> Of course we could manually set the asynTrace mask to 0, as shown above. But it would be nice to have the capability that Matt proposes, to automatically reduce the number of messages in the log file if they are all just repeats.
> Agreed, but I'm holding to my opinion that this capability belongs in the log server, not in all the log clients. It certainly does not belong in the ASYN layer. In the errlogPrintf layer, perhaps, but really this belongs in the log server.
>
> --
> Eric Norum
> [email protected]
>
>
>
>
>
>
- Replies:
- RE: log message filter in Asyn matthew.pearson
- References:
- log message filter in Asyn matthew.pearson
- Re: log message filter in Asyn Andrew Johnson
- RE: log message filter in Asyn Mark Rivers
- Re: log message filter in Asyn Eric Norum
- RE: log message filter in Asyn matthew.pearson
- Re: log message filter in Asyn Ralph Lange
- Navigate by Date:
- Prev:
Java/Eclipse/CSS Expertise and Python/PyQt/RDB/IRMIS Expertise Needed - to hire or collaborate Dalesio, Leo
- Next:
RE: log message filter in Asyn matthew.pearson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: log message filter in Asyn Ralph Lange
- Next:
RE: log message filter in Asyn matthew.pearson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024