io.stderr
Defined in module
"io"from "io" import stderrThe process's standard error stream, already open as an io.file instance.
Notes
stderr is a separate stream from stdout; a tool that merges both into one log (as the reference tests do) only preserves their relative order because neither stream buffers, so every write lands as soon as it happens. stderr shares the process's handle rather than owning it, so close on it does nothing, the same as on stdout.
Example
from "io" import stdout, stderr
stdout.writestring("stdout line\n")
stderr.writestring("stderr line\n") // a separate stream, merged into the same log by the shell
println(typeof stderr) // "file": stderr is an io.file instance, not a special typeOutput:
stdout line
stderr line
fileSee also
stdout | The process's standard output stream, already open as an io.file instance. |
stdin | The process's standard input stream, already open as an io.file instance. |
writestring | Writes the string and returns the number of characters written |
| io | module index |