What is best way to get see function from separate file
Suliman via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Apr 10 11:26:57 PDT 2016
Sorry for wrong posting!
I have got logger instance in App.d
void main()
{
...
FileLogger fLogger = new FileLogger("ErrorLog.txt");
foo();
}
utils.d:
foo()
{
// I need logging here
}
Also I have file utils.d that include stand-alone functions that
is not in classes. In one of them I need to implement logging.
What is the best way to do it. I see only two way -- create new
Loggining instance. And second -- to import App.d as module,
because without importing I would not able to see Logger instance.
But both of this way is look ugly. Is there any best solution?
More information about the Digitalmars-d-learn
mailing list