Repository: ipython/ipython

Issue:
/var/log/ipynb.log gets wiped out on kernel restart and no more logging occurs
I am running ipython notebook via supervisord

```
command=/opt/anaconda/bin/ipython notebook --no-browser --port "7782"  --logfile "/var/log/kbroughton_ipynb.log" --ip "172.x.y.z" --hb "7776" --NotebookApp.password=sha1:c3b41**redacted --certfile=/etc/pki/ipython.pem
```

Logging works great at first

```
root@kbr-compute:/etc/supervisor# tail /var/log/kbroughton_ipynb.log
2015-03-20 00:05:30.955 [NotebookApp] Using existing profile dir: u'/home/kbroughton/.ipython/profile_default'
2015-03-20 00:05:30.966 [NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
...
```

After a kernel restart
 root@kbr-compute:/etc/supervisor# tail /var/log/kbroughton_ipynb.log
# IPython log file

The above is the only line in the file, despite activities that should create logs like failed logins.

Here is my system conf.

root@kbr-compute:/etc/supervisor# python -c "import IPython; print(IPython.sys_info())"
{'commit_hash': 'd87a8cd',
 'commit_source': 'installation',
 'default_encoding': 'UTF-8',
 'ipython_path': '/opt/anaconda/lib/python2.7/site-packages/IPython',
 'ipython_version': '2.2.0',
 'os_name': 'posix',
 'platform': 'Linux-3.13.0-30-generic-x86_64-with-debian-jessie-sid',
 'sys_executable': '/opt/anaconda/bin/python',
 'sys_platform': 'linux2',
 'sys_version': '2.7.9 |Anaconda 2.1.0 (64-bit)| (default, Mar  9 2015, 16:20:48) \n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]'}

I should be able to test from master if needed.

I would expect that a kernel restart should be noted in the logs and they would continue merilly.

I can reset the logging by restarting supervisor on the process
[root@kbr-compute:/etc/supervisor ] supervisorctl restart kbroughton_ipython_notebook

Possibly Related
http://stackoverflow.com/questions/18786912/get-output-from-the-logging-module-in-ipython-notebook
https://pytools.codeplex.com/workitem/1836



Discussion:
```
--logappend=<Unicode> (InteractiveShell.logappend)
    Default: ''
    Start logging to the given file in append mode.
--logfile=<Unicode> (InteractiveShell.logfile)
    Default: ''
    The name of the logfile to use.
```

So I guess you want to use `--logappend` and not `--logfile`

Note that IPython 3.0 is the new stable, and that in IPython 3 you cannot pass the kernels flag to the notebook anymore. 


Resolving patch:
diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py
--- a/IPython/core/interactiveshell.py
+++ b/IPython/core/interactiveshell.py
@@ -320,7 +320,8 @@ def _exiter_default(self):
     
     logstart = CBool(False, config=True, help=
         """
-        Start logging to the default log file.
+        Start logging to the default log file in overwrite mode.
+        Use `logappend` to specify a log file to **append** logs to.
         """
     )
     logfile = Unicode('', config=True, help=
@@ -331,6 +332,7 @@ def _exiter_default(self):
     logappend = Unicode('', config=True, help=
         """
         Start logging to the given file in append mode.
+        Use `logfile` to specify a log file to **overwrite** logs to.
         """
     )
     object_info_string_level = Enum((0,1,2), default_value=0,


Test patch: