singlog/tests/test.d

14 lines
578 B
D
Raw Normal View History

2023-04-27 18:08:12 +00:00
import singlog;
void main(string[] argv) {
2023-04-28 08:32:15 +00:00
log.output(log.SYSLOG | log.STDOUT | log.FILE) // write to syslog, standard output stream and file
.name(argv[0]) // program name as an identifier (for Windows OS)
.level(log.DEBUGGING) // logging level
.file("./test.log"); // the path to the log file
log.e("This is an error message");
log.error("And this is also an error message");
log.w("This is a warning message");
log.i("This is an information message");
2023-04-27 18:08:12 +00:00
}