-Xlog warnings and errors always go to stdout regardless of the `file` attribute; they also go to file, but there seems no way to switch off output to stderr.
Example:
```
log_trace(os)("trace");
log_debug(os)("debug");
log_info(os)("info");
log_warning(os)("warn");
log_error(os)("error");
```
with
```
-Xlog:os=debug
```
I get on stdout
```
[0,058s][debug][os] debug
[0,058s][info ][os] info
[0,058s][warning][os] warn
[0,058s][error ][os] error
```
which is fine.
If I run with
```
-Xlog:os=debug:file=x.log
```
I get a file `a.log` containing the same output, good, but I still see the output for warning and error on stdout:
```
[0,060s][warning][os,rss] warn
[0,060s][error ][os,rss] error
```
---
p.s. a different issue is that warnings and error messages seem to, by default, being written to stdout, which contradicts the UL spec ([1]); however, I do not know if that spec is the current documentation for UL (or if we even have one)
[1] https://openjdk.org/jeps/158
Example:
```
log_trace(os)("trace");
log_debug(os)("debug");
log_info(os)("info");
log_warning(os)("warn");
log_error(os)("error");
```
with
```
-Xlog:os=debug
```
I get on stdout
```
[0,058s][debug][os] debug
[0,058s][info ][os] info
[0,058s][warning][os] warn
[0,058s][error ][os] error
```
which is fine.
If I run with
```
-Xlog:os=debug:file=x.log
```
I get a file `a.log` containing the same output, good, but I still see the output for warning and error on stdout:
```
[0,060s][warning][os,rss] warn
[0,060s][error ][os,rss] error
```
---
p.s. a different issue is that warnings and error messages seem to, by default, being written to stdout, which contradicts the UL spec ([1]); however, I do not know if that spec is the current documentation for UL (or if we even have one)
[1] https://openjdk.org/jeps/158