www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23487] New: std.experimental.logger assigning FileLogger to


          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 puremagic.com
          Reporter: d.bugs webfreak.org

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

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

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


serverbase/source/served/serverbase.d(595,2): Error: none of the overloads of
`sharedLog` are callable using argument types `(FileLogger)`
       Candidates are: `std.logger.core.sharedLog()`
                       `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.

Nov 15 2022