On Wednesday, 12 July 2023 at 09:47:26 UTC, Danilo wrote:
On Wednesday, 12 July 2023 at 05:27:27 UTC, mw wrote:
But what's wrong with my code? the strange compiler error?
Might be a bug/issue in the logger module.
`sharedLog` uses the `shared` attribute,
but the base class for everything ("ab
WebFreak said you can just use trace(), info() etc. inside
threads. It is thread-safe by default.
```d
module app;
import std.stdio;
import std.logger;
void main() {
//auto file = File("logFile.log", "w");
auto file = stderr; // stdout
sharedLog = cast(shared)new FileLogger(file)
On Wednesday, 12 July 2023 at 05:27:27 UTC, mw wrote:
But what's wrong with my code? the strange compiler error?
Might be a bug/issue in the logger module.
`sharedLog` uses the `shared` attribute,
but the base class for everything ("abstract class Logger")
does not use the `shared` attribute a
On Wednesday, 12 July 2023 at 04:48:23 UTC, Danilo wrote:
On Wednesday, 12 July 2023 at 01:55:00 UTC, mw wrote:
```
import std.experimental.logger;
void main() {
std.experimental.logger.sharedLog.trace("msg");
}
```
See examples at https://dlang.org/phobos/std_logger.html
and https://dlan
On Wednesday, 12 July 2023 at 01:55:00 UTC, mw wrote:
```
import std.experimental.logger;
void main() {
std.experimental.logger.sharedLog.trace("msg");
}
```
See examples at https://dlang.org/phobos/std_logger.html
and https://dlang.org/phobos/std_logger_filelogger.html
```d
import std.st
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 lo
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.
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.
Thanks.