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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 15 15:14:31 UTC 2022


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

          Issue ID: 23487
           Summary: std.experimental.logger assigning FileLogger to
                    sharedLog no longer works
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: d.bugs at webfreak.org

the example code that's given in the logger documentation no longer works:

```d
sharedLog = new FileLogger("New_Default_Log_File.log");
```

(from https://dlang.org/phobos/std_experimental_logger.html)

Error:

serverbase/source/served/serverbase.d(595,2): Error: none of the overloads of
`sharedLog` are callable using argument types `(FileLogger)`
/opt/hostedtoolcache/dc/dmd-2.101.0/x64/dmd2/linux/bin64/../../src/phobos/std/logger/core.d(1456,26):
       Candidates are: `std.logger.core.sharedLog()`
/opt/hostedtoolcache/dc/dmd-2.101.0/x64/dmd2/linux/bin64/../../src/phobos/std/logger/core.d(1471,16):
                       `std.logger.core.sharedLog(shared(Logger) logger)`

this has only started happening with DMD 2.101.0 now

Trying to use `new shared FileLogger()` also doesn't work, so I'm not sure how
to fix this issue from user code, as it looks like assigning a shared Logger is
the more correct thing to do here.

--


More information about the Digitalmars-d-bugs mailing list