1
0
Fork 0
singlog/tests/test.d

18 lines
756 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
2023-06-05 21:17:56 +00:00
.program(argv[0]) // program name as an identifier (for Windows OS)
2023-04-28 08:32:15 +00:00
.level(log.DEBUGGING) // logging level
2023-06-05 21:17:56 +00:00
.color(true) // color text output
2023-04-28 08:32:15 +00:00
.file("./test.log"); // the path to the log file
2023-06-05 21:17:56 +00:00
log.i("This is an information message");
log.n("This is a notice message");
log.w("This is a warning message");
log.e("This is an error message");
log.c("This is a critical message");
log.a("This is an alert message");
log.d("This is a debug message");
2023-04-27 18:08:12 +00:00
}