dsfml.system.err

By default, $(U err) outputs to the same location as stderr, which is the console if there's one available.

It is a standard std.stdio.File instance, so it supports all the functions as defined by this structure (write, writeln, open, lock, etc.)

$(U err) can be redirected to write to another output, independantly of stderr, by using the open function. Note that unlike SFML's err(), DSFML's err cannot be redirected to 'nothing' at this time.

Members

Variables

err
File err;

Standard std.stdio.File instance used by DSFML to output warnings and errors.

Examples

1 // Redirect to a file
2 auto file = File("dsfml-log.txt", "w");
3 auto previous = err;
4 err = file;
5 
6 // Restore the original output
7 err = previous;

Meta