www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23840] New: log(str) is not work

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

          Issue ID: 23840
           Summary: log(str) is not work
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: 1499874170 qq.com

For std/logger/package.d
The comments tell me:

The easiest way to create a log message is to write:
-------------
import std.logger;

void main() {
    log("Hello World");
}
-------------

But I created a test project:
(test.d)
import std.logger;
void main(string[] args)
{
    log("test");
}

It is not any output.

But if I change it:
(test.d)
import std.logger;
void main(string[] args)
{
    log(LogLevel.info, "test");
}

It is working.

--
Apr 15 2023