question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ghost-cli log destination option (and/or option to suppress logging to file)

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
acburdinecommented, Jun 27, 2017

Closed by #237 - error logs are now put in the home directory (under ~/.ghost/logs)

0reactions
acburdinecommented, Jun 27, 2017

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 /path/to/ghost/content/logs, the same as they would be normally. So to answer your question, the debug logs are under the home folder of the user that ran the ghost-cli command, not the user that actually runs Ghost.

It’s exactly the same use-case as yarn/npm. Npm, however, no longer stores a debug log locally - it’s stored in ~/.npm/_logs, so essentially we’re following the same behavior as NPM. It does clean up the instance folder a bit, so you don’t end up with a bunch of debug logs in the same folder. Thinking about it, npm’s reason for change is probably more that npm-debug.log files were being committed to git repos (a use-case which we don’t really have to worry about), but it still makes it cleaner.

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>”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ghost-CLI - A fully loaded tool for installation and configuration
Setting up MySQL; Configuring systemd; Accessing Ghost log files; Managing existing Ghost installs. Install & update. Ghost-CLI is an npm module that can ......
Read more >
optuna.logging.disable_propagation - Read the Docs
Disable propagation of the library log outputs. Note that log propagation is disabled by default. You only need to use this function to...
Read more >
How to disable a log.Logger - Stack Overflow
No reason to create your own type for a common io.Writer when one exists in the io/ioutil package. import ( "log" "io/ioutil" )...
Read more >
ghost-cli - npm
Start using ghost-cli in your project by running `npm i ghost-cli`. There are 3 other projects in the npm registry using ghost-cli.
Read more >
How To Configure and Maintain Ghost from the Command Line
This means that we can start, stop and restart it easily using Ubuntu's ... The “-uo” options extract newer versions of files and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found