D
Damien Cymbal
Hi,
I am working on a network application library that is structured like this:
There is a series of about 10-15 utility or building-block classes
that consumers can use to get at primitive functionality for creating
their own clients.
On top of this, there is provided a client class that makes use of the
primitive classes and provides a higher level abstraction to a consumer.
What I am currently struggling with is how to perform a consistent and
useful interface for reporting debug messages to the consumer.
Initially I had a system where the consumer had a global hook that it
could set to get the messages. This works well if only one client is
in use, but it doesn't satisfy the desire to provide individual hooks
to multiple clients or threads.
Passing an actual logging reference into each component for logging
just seems way too instrusive.
I suppose this is one of those classic cross-cutting issues in software
development. Can anyone provide any added thoughts on how they have solved
this problem in the past? Any recommendations for other open-source libs
that have done a nice job of handling this that I could look at?
Thanks.
I am working on a network application library that is structured like this:
There is a series of about 10-15 utility or building-block classes
that consumers can use to get at primitive functionality for creating
their own clients.
On top of this, there is provided a client class that makes use of the
primitive classes and provides a higher level abstraction to a consumer.
What I am currently struggling with is how to perform a consistent and
useful interface for reporting debug messages to the consumer.
Initially I had a system where the consumer had a global hook that it
could set to get the messages. This works well if only one client is
in use, but it doesn't satisfy the desire to provide individual hooks
to multiple clients or threads.
Passing an actual logging reference into each component for logging
just seems way too instrusive.
I suppose this is one of those classic cross-cutting issues in software
development. Can anyone provide any added thoughts on how they have solved
this problem in the past? Any recommendations for other open-source libs
that have done a nice job of handling this that I could look at?
Thanks.