1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-06-02 07:41:32 +00:00

Open log file rather than use stdout

This commit is contained in:
Peter Evans 2018-03-29 21:42:38 -05:00
parent 20d33ef464
commit 7ca099d0d0

View File

@ -48,7 +48,12 @@ init(int argc, char **argv)
vm_di_set(VM_OUTPUT, stdout);
log_open(stdout);
FILE *stream = fopen(LOG_FILENAME, "w");
if (stream == NULL) {
perror("Can't open log file");
}
log_open(stream);
if (vm_screen_init() != OK) {
fprintf(stderr, "Couldn't initialize video\n");