Namespace clash between modules

Marek Janukowicz marek at janukowicz.net
Tue Aug 13 11:15:05 PDT 2013


evilrat wrote:
> is it necessary use multiple loggers?

Of course - as the whole thing is about logging, which is not a critical 
part of the application - I could try another approach. However, I'd like to 
have per-module logger, because it's convenient to manage them this way (eg. 
I often need to change log level for particular module or I use different 
colors for a module).

> maybe you should move ur
> Logger instance to module scope(log module) and just handle log
> sources some other way(i.e. add source string mapping in log
> module)?

It would be a viable solution, although definitely it would be more 
complicated than what I have now.

> because i mean this clash is just due to multiple
> instantions of this template

Yes, I realize that multiple instantiations are the reason for this clash. 
However, being a D newbie I really wanted to ask the list first, hoping 
there might be some simple solution I don't know about.

-- 
Marek Janukowicz


More information about the Digitalmars-d-learn mailing list