Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avoid red background color for logging output in Ipython Notebook

Is it possible to avoid the red background color when the notebook prints logging output? For an example see this sample notebook.

http://nbviewer.ipython.org/gist/bjonen/1bd52a7d8a4761a74074

like image 831
bjonen Avatar asked Aug 18 '14 10:08

bjonen


Video Answer


1 Answers

The red background highlights output sent to stderr as opposed to stdout. To avoid it, you could send your logging to stdout:

ch = logging.StreamHandler(sys.stdout)
like image 130
Thomas K Avatar answered Oct 13 '22 08:10

Thomas K