int engine_loadconf(struct engine *engine, const char *config_path)
{
assert(config_path != NULL);
+
+ char cwd[PATH_MAX];
+ get_workdir(cwd, sizeof(cwd));
+ kr_log_verbose("[system] loading config '%s' (workdir '%s')\n", config_path, cwd);
+
int ret = luaL_dofile(engine->L, config_path);
if (ret != 0) {
fprintf(stderr, "%s\n", lua_tostring(engine->L, -1));
if (strcmp(config, "-") == 0) {
load_defaults = false;
} else if (access(config, R_OK) != 0) {
- kr_log_error("[system] config '%s': %s\n", config, strerror(errno));
+ char cwd[PATH_MAX];
+ get_workdir(cwd, sizeof(cwd));
+ kr_log_error("[system] config '%s' (workdir '%s'): %s\n",
+ config, cwd, strerror(errno));
return EXIT_FAILURE;
}
}