Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config error log is now moved properly. #849

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion code/game/world.dm
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ GLOBAL_VAR(restart_counter)

GLOB.demo_log = "[GLOB.log_directory]/demo.log"

GLOB.config_error_log = "[GLOB.log_directory]/config_error.log"
//Config Error Log must be set later to ensure that we move the files over.

#ifdef UNIT_TESTS
GLOB.test_log = "[GLOB.log_directory]/tests.log"
Expand All @@ -189,10 +189,14 @@ GLOBAL_VAR(restart_counter)

var/latest_changelog = file("[global.config.directory]/../html/changelogs/archive/" + time2text(world.timeofday, "YYYY-MM") + ".yml")
GLOB.changelog_hash = fexists(latest_changelog) ? md5(latest_changelog) : 0 //for telling if the changelog has changed recently

// Okay, we have a properly constructed log directory and we're all clean and safe. Sort the config error log properly.
if(fexists(GLOB.config_error_log))
fcopy(GLOB.config_error_log, "[GLOB.log_directory]/config_error.log")
fdel(GLOB.config_error_log)

// NOW we can change the write directory handle over.
GLOB.config_error_log = "[GLOB.log_directory]/config_error.log"

if(GLOB.round_id)
log_game("Round ID: [GLOB.round_id]")
Expand Down
Loading