-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
ghost-cli log destination option (and/or option to suppress logging to file) #203
Comments
@peterhuene this is definitely configurable via
|
Hi @acburdine. Thanks for the response! To ensure I'm on the same page, I'm referring specifically to the logging that happens here: https://github.com/TryGhost/Ghost-CLI/blob/master/lib/ui.js#L185. I should have mentioned that this is error logging to the debug file and not just normal logging. It seems that this code is directly writing to the file without any possibility for configuration, or am I misunderstanding things? |
OH right that's what you're talking about, I misread the issue initially. My apologies 😄. |
Ah I realized what might be your issue in the first place that caused the write error. Whenever you run So here's my suggestion: whenever you run All of this is why it's recommended that the process running Ghost have actual write access to the folder it's in. Without that write access, ymmv. |
That was the original issue, but this is being done in the context of a Docker container. For now, I am doing Note: the Ghost content directory is writable by the less-privileged user (it's actually a volume mounted into the container so that the data persists even when the container terminates). Hope that makes sense. I'd love to see a At any rate, with respect to this particular issue, it would simply be nice if users could control what files the CLI tool generates into a place where it may not have write access to; writing the debug log to $HOME makes sense to me at least. Thanks again for your quick replies! |
The current incarnation of the ghost-cli tool needs to have write-access to the files inside of the folder in which ghost is installed, not just to perform installs and updates, but also to write log files, AND dot files which are critical to its working. Seeing as IMO, this is actually a duplicate of #189 - the fact that ghost-cli needs to downgrade privileges itself. |
closes TryGhost#219, TryGhost#203, TryGhost#170 - addition of System and Interface classes to manage configuration/environment - fix update command weirdness - cleanup & fix process name handling
closes TryGhost#219, TryGhost#203, TryGhost#170 - addition of System and Interface classes to manage configuration/environment - fix update command weirdness - cleanup & fix process name handling - move error logging to user home directory
Closed by #237 - error logs are now put in the home directory (under |
I really don't understand this change. If you run ghost-cli as one user, and ghost as another user, the logs are now under which user's account? This is confusing and doesn't make sense to me. Again, I think we need to solve the problem of users, permissions and what the expectations are first. P.S. IMO - this is a similar case to yarn or npm where having a local debug log makes 100% sense. If there is a clear case for moving the logs, then what is it please? And also what is the precedent for using |
@ErisDS good questions. I am also a bit confused about having the CLI debug/error log in |
Apologies for the lack of clarification. The logs in question are debug logs, which are only generated if something goes wrong and is not a user error (e.g. ran a command not in a ghost instance, missing/invalid config value, etc.). Any logs generated by Ghost (not the CLI) are stored in It's exactly the same use-case as yarn/npm. Npm, however, no longer stores a debug log locally - it's stored in Also, whenever a debug file is generated, a line is printed after the "debug info" that says "Additional Info can be found in <debug file in ~/.ghost/logs>". |
I'd like to be able to install ghost into a location where the user account ghost is running under doesn't have write access to.
I've configured ghost such that it never writes to this directory (i.e. content directory is at a writable location), but running ghost-cli as that user causes errors because it doesn't have permission to write the
ghost-cli-debug-$date.log
file.It would be nice if there was an option for the log file path so that it doesn't write to CWD (i.e. where ghost is installed). It would also be nice if there was an option to suppress file logging from ghost-cli entirely.
The text was updated successfully, but these errors were encountered: