Moving jupyter notebook logging to textfile

3,180 views
Skip to first unread message

Matt Rice

unread,
Apr 18, 2016, 5:48:49 PM4/18/16
to Project Jupyter
Hello,

I've been running IPython notebook for the past few months for my users. When running IPython notebook I was able to direct all logging messages to a textfile that we used to document the logging output. This was the code we used in our script to run at server startup

"IPYTHON_OPTS='notebook --profile=pyspark' pyspark --master yarn --deploy-mode client --num-executors 18 --executor-memory 6g --executor-cores 4 --driver-memory 6g --driver-cores 4 &" 2&>> /var/log/ipython-notebook.out

We were able to have all logging messages stored in ipython-notebook.out

Once we upgraded to jupyter notebook we tried to run a similar startup script and we have been unable to get the jupyter notebook logging to be written to an output textfile, and we have not been able to get the jupyter notebook logging to not run in the console, even when we run the process in background.

Has anybody else ran into this issue? Is there a way to force jupyter notebook to write its logging messages to an output textfile?

Best,

Matt Rice 

MinRK

unread,
Apr 19, 2016, 5:25:46 AM4/19/16
to Project Jupyter
Piping stderr has always been the most reliable way to do it for me, especially since it's inherently a multi-process application, and writing to a file at the Python level necessarily means separating the output of each file from each other. What output did you get in the file before that you do not now?

-MinRK
 

Best,

Matt Rice 

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/fdd5c454-3823-49b3-bfcd-3014ebfe1d84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Rice

unread,
Apr 19, 2016, 11:15:09 AM4/19/16
to Project Jupyter
Hi MinRk,

Piping stderr and stdout both to a output text file with the following syntax ended up working with the behavior I wanted:

 jupyter notebook &>>notebook.out 

Thank you for responding to my question.

-Matt Rice
Reply all
Reply to author
Forward
0 new messages