[logback-user] duplicate messages with only a single logger in the logger context.
Gibbons, P (Paul)
Paul.gibbons at diamond.ac.uk
Sat Apr 5 11:03:19 CEST 2008
Hi my setup consists of:
serverProcess - generates messages which are sent via SocketAppender to guiProcess and viewerProcess
guiProcess - displays messages received from serverProcess and also generates messages which it displays and are sent via SocketAppender to viewerProcess
viewerProcess - displays messages received from guiProcess and serverProcess.
My problem is that messages generateg by serverProcess appear twice on viewerProcess. One instance comes directly from serverProcess and the other from guiProcess.
The guiProcess is treated messages from serverProcess as local messages and so sends them via its SocketAppender to the viewerProcess.
I cannot use filters to prevent the guiProcess SocketAppender resending the serverProcesses as the message formats are the same from both the serverProcess and guiProcess.
One option could be to use a different logger context in the guiProcess handling of messages it receives from serverProcess. I am not sure of how to create a logger context which is not
the default logger context for the application.
Can anyone suggest how best to prevent the guiProcess from resending the messages it receives from the serverProcess or any other way of preventing the duplication of messages appearing on the
viewerProcess. I suppose I could somehow simply drop a message from being processed on the viewerProcess if it is the same as the previous message; I am not sure how to do this however.
<DIV><FONT size="1" color="gray">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
More information about the Logback-user