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

Logging of console output #3

Open
gerbsen opened this issue Oct 21, 2015 · 5 comments
Open

Logging of console output #3

gerbsen opened this issue Oct 21, 2015 · 5 comments

Comments

@gerbsen
Copy link

gerbsen commented Oct 21, 2015

hey @lmammino, thanks for this easy to use install script!

Just one question: is it possible to write the log messages to a log file?

Cheers, Daniel

@lmammino
Copy link
Owner

Hello @gerbsen,
first of all thanks for using the script 😉

For what regards logging, generally, you should be able to write the output of a program by using this syntax:

program &>/path/to/logfile

so I guess you can try to edit the init script by adding &>/path/to/logfile in the start function at line 26. Something like the following:

if start-stop-daemon --background --make-pidfile --pidfile $PIDFILE -o --chuid $USER:$GROUP --start --startas "$APP_DIR/$APP_BIN" -- $APP_ARGS &>/path/to/logfile ; then

Be sure to specify the right path.

I haven't tried this tough, so please let me know if it work.

Regards

@lmammino
Copy link
Owner

Also you can have a look here for a more detailed explanation and more examples: http://upstart.ubuntu.com/wiki/Debugging

@gerbsen
Copy link
Author

gerbsen commented Oct 22, 2015

Okay, thanks for your quick reply. Unfortunately I just found out that service prerender startdoesn't start anything: ps -ef | grep prerender doesn't show up anything. I'm going to debug the script as you suggested now. Will keep you updated!

@lmammino
Copy link
Owner

Ok. Please let me know how it goes. If you are successful and find an easy way to do it we may integrate the feature in the script.

@gerbsen
Copy link
Author

gerbsen commented Oct 22, 2015

Okay, I will open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants