title: How to enable and access debug logging for notebook and IPython kernel
body: <p>I'm doing a small research on IPython kernel and trying to get debug logs out of it and see how it interacts with a notebook. Now it looks like the documentation and example configs shipped in my distribution is totally outdated.</p>
  
  <h2>The questions</h2>
  
  <ol>
  <li>Where the ipython kernel log files are located?</li>
  <li>How can I enable DEBUG level logging in both jupyter notebook and ipython kernel?</li>
  </ol>
  
  <h2>What I've tried</h2>
  
  <p><em>Please read this section before giving links to the official docs</em></p>
  
  <p>First I created profiles for both IPython and notebook with the following commands:</p>
  
  <pre><code>$ ipython profile create
  $ jupyter notebook --generate-config
  </code></pre>
  
  <p>As expected three files where created:</p>
  
  <ul>
  <li>.jupyter/jupyter_notebook_config.py</li>
  <li>.ipython/profile_default/ipython_config.py</li>
  <li>.ipython/profile_default/ipython_kernel_config.py</li>
  </ul>
  
  <p>In these files I found similar commented fragments:</p>
  
  <pre><code> # Set the log level by value or name.
   # c.Application.log_level = 0
  </code></pre>
  
  <p>I tried to uncomment it in the jupyter config. Instead of adding more details it totally disabled console output for the <code>jupyter</code> process. I also tried value <code>50</code> it has the same result, value <code>DEBUG</code> gave me Python error on start.</p>
  
  <p>I also played with these values in ipython's configs but I wasn't able to find log files location.</p>
  
  <p>In mail list command line option <code>--log-level=DEBUG</code> is mentioned and indeed it works for jupyter. But I really want to persist this setting in a profile and have debug info for the kernel too.</p>
  
  <p>Config options <code>NotebookApp.log_level</code> and <code>IPKernelApp.log_level</code> also change nothing.</p>