www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - sharedLog between dll

reply Domain <dont_email empty.com> writes:
I want to redirect the sharedLog to my logger in one dll, and all 
dlls will use the new one. What should I do?

sharedLog = new MyLogger(); // this will not change the logger in 
other dll
Aug 01 2017
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
On 01/08/2017 9:28 AM, Domain wrote:
 I want to redirect the sharedLog to my logger in one dll, and all dlls 
 will use the new one. What should I do?
 
 sharedLog = new MyLogger(); // this will not change the logger in other dll
You said the magic phrase, DLL. Can't share e.g. classes between dll/host[0]. [0] https://issues.dlang.org/show_bug.cgi?id=4071
Aug 01 2017
parent reply Domain <dont_email empty.com> writes:
On Tuesday, 1 August 2017 at 09:06:39 UTC, rikki cattermole wrote:
 On 01/08/2017 9:28 AM, Domain wrote:
 I want to redirect the sharedLog to my logger in one dll, and 
 all dlls will use the new one. What should I do?
 
 sharedLog = new MyLogger(); // this will not change the logger 
 in other dll
You said the magic phrase, DLL. Can't share e.g. classes between dll/host[0]. [0] https://issues.dlang.org/show_bug.cgi?id=4071
That issue is reported 7 years ago! I think DLL support should be a basic feature. And I think the core team spend too little time on those features which will block the usage of D in the real world. I have to reconsider using C++ instead.
Aug 01 2017
parent rikki cattermole <rikki cattermole.co.nz> writes:
On 01/08/2017 11:27 AM, Domain wrote:
 On Tuesday, 1 August 2017 at 09:06:39 UTC, rikki cattermole wrote:
 On 01/08/2017 9:28 AM, Domain wrote:
 I want to redirect the sharedLog to my logger in one dll, and all 
 dlls will use the new one. What should I do?

 sharedLog = new MyLogger(); // this will not change the logger in 
 other dll
You said the magic phrase, DLL. Can't share e.g. classes between dll/host[0]. [0] https://issues.dlang.org/show_bug.cgi?id=4071
That issue is reported 7 years ago! I think DLL support should be a basic feature. And I think the core team spend too little time on those features which will block the usage of D in the real world. I have to reconsider using C++ instead.
Please email Walter about this. It works everywhere else.
Aug 01 2017