Skip to content

Commit

Permalink
Reordered error logging on ghost start (#9440)
Browse files Browse the repository at this point in the history
no issue

- if we trigger the IPC message to the CLI and the process manager is systemd, systemd will restart Ghost too early (same for local process manager) - this is a timing issue
- the consequence is that the error log won't happen in Ghost (`content/logs/[domain].error.log`  won't contain that error)
- let's reorder both executions

[See](https://github.com/TryGhost/Ghost-CLI/pull/612/files#r165817172) this comment on the CLI PR.
  • Loading branch information
kirrg001 committed Feb 4, 2018
1 parent fb973db commit f9d4d01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Expand Up @@ -37,10 +37,11 @@ ghost().then(function (ghostServer) {
err = new common.errors.GhostError({err: err});
}

common.logging.error(err);

if (process.send) {
process.send({started: false, error: err.message});
}

common.logging.error(err);
process.exit(-1);
});

0 comments on commit f9d4d01

Please sign in to comment.