On Wednesday, 12 July 2023 at 01:26:25 UTC, mw wrote:
On Wednesday, 12 July 2023 at 01:24:41 UTC, mw wrote:
Hi,

Just wondering which logger library is thread safe?

https://code.dlang.org/

Need to find a mature one to be used in a multi-threaded env.


Oh, forget to mention: need output to logger file.

tried:

https://run.dlang.io/is/ufy4yF

```
import std.experimental.logger;

void main() {
    std.experimental.logger.sharedLog.trace("msg");
}
```

but:

onlineapp.d(4): Error: none of the overloads of template `std.logger.core.Logger.memLogFunctions!LogLevel.trace.logImpl` are callable using argument types `!()(string) shared` /dlang/dmd/linux/bin64/../../src/phobos/std/logger/core.d(734): Candidates are: `logImpl(int line = __LINE__, string file = __FILE__, string funcName = __FUNCTION__, string prettyFuncName = __PRETTY_FUNCTION__, string moduleName = __MODULE__, A...)(lazy A args)` /dlang/dmd/linux/bin64/../../src/phobos/std/logger/core.d(780): `logImpl(int line = __LINE__, string file = __FILE__, string funcName = __FUNCTION__, string prettyFuncName = __PRETTY_FUNCTION__, string moduleName = __MODULE__, A...)(lazy bool condition, lazy A args)`


so, how to fix this compiler error?

Reply via email to