tags:

views:

27

answers:

1

I have a component that is constantly reading a values from a device. Currently it updates every {n} seconds and logs a debug message with the value to an instance of ILog.

Every second is too frequent for me, I just don't care and it eats up too much log space. However, I would certainly be interested in capturing every 10th or 30th message from that component so I can get the general gist of what it is doing.

Does anyone know any way of doing this that does not involve me witting my own ILog implementation?

+1  A: 

Depends on what you are logging. If there is something to be logged every second, then perhaps you should revisit what you are logging.

You could hash the similiar messages and print them after some time.

Floetic
Well I'm not logging it, I disable debug level logging for that component but I keep it as an option of course if I want to log the value the application thinks is currently on the device. Hashing sounds like a good solution is there an easy way to configure it?
George Mauer