[Issue 23487] std.experimental.logger assigning FileLogger to sharedLog no longer works

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 31 19:45:11 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=23487

Forest <forestix at nom.one> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |forestix at nom.one

--- Comment #2 from Forest <forestix at nom.one> ---
The 2.108.1 are live, and the example at that URL still doesn't work.

This seems to do the trick:

sharedLog = cast(shared(Logger)) new FileLogger("foo.log");

Is this now considered the correct way to do it?

It would be nice if awkward casts like this were not imposed on the user.

--


More information about the Digitalmars-d-bugs mailing list