Skip to content

Log fixes#70

Open
Pizzabelly wants to merge 1 commit into
Fexty12573:masterfrom
Pizzabelly:log-cleanup
Open

Log fixes#70
Pizzabelly wants to merge 1 commit into
Fexty12573:masterfrom
Pizzabelly:log-cleanup

Conversation

@Pizzabelly

Copy link
Copy Markdown
Contributor

The main issue addressed here is the first log message wouldn't be included in the log file. This was because the initial state of s_file when evaluated as a boolean returns true. Checking if (!s_file) to consider opening the file only passed after the first attempted write fails and s_file is put in a error state.

The other fix is to not return on an error in log_raw(), instead handle the potential error state when deciding whether to write to the file/console or not.

Also, I added a warning that if logLevel is invalid, Stracker's Loader will crash the game when loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants