Fix logging on interactive shell. #2102

Merged
merged 1 commit into from Jul 5, 2012

Conversation

Projects
None yet
2 participants
@RuiPereira
Contributor

RuiPereira commented Jul 5, 2012

Add a missing string format code in init_logs() and move init_logstart() after init_magics(), to fix dependency issues.

This is a proposed fix for the case a log file is given in ipython_config.py, eg:

# Start logging to the given file in append mode.                                                                                         
import os
from time import strftime
f = os.path.join(c.TerminalIPythonApp.ipython_dir, strftime('%Y-%m-%d')+".py")
c.TerminalInteractiveShell.logappend = f

which completely breaks in current master code

Fix logging on interactive shell.
Add a missing string format code in init_logs() and move init_logstart() after init_magics(), to fix dependency issues.
@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Jul 5, 2012

Member

Yup, looks good; thanks!

Member

fperez commented Jul 5, 2012

Yup, looks good; thanks!

fperez added a commit that referenced this pull request Jul 5, 2012

Merge pull request #2102 from RuiPereira/fixlog
Fix logging on interactive shell.

Add a missing string format code in `init_logs()` and move `init_logstart()` after `init_magics()`, to fix dependency issues.

Fixes the case where a log file is given in `ipython_config.py`, eg:

```python
# Start logging to the given file in append mode.

import os
from time import strftime
f = os.path.join(c.TerminalIPythonApp.ipython_dir, strftime('%Y-%m-%d')+".py")
c.TerminalInteractiveShell.logappend = f
```

which completely breaks in current `master` code.

@fperez fperez merged commit 56d2be5 into ipython:master Jul 5, 2012

@fperez fperez referenced this pull request Jul 5, 2012

Closed

error when starting ipython #2087

Carreau added a commit to Carreau/ipython that referenced this pull request Jul 13, 2012

Fix logging on interactive shell.
Add a missing string format code in init_logs() and move init_logstart() after init_magics(), to fix dependency issues.

backported to 0.13.1 from PR #2102

minrk added a commit that referenced this pull request Jul 21, 2012

Backport PR #2102: Fix logging on interactive shell.
Add a missing string format code in init_logs() and move init_logstart() after init_magics(), to fix dependency issues.

This is a proposed fix for the case a log file is given in `ipython_config.py`, eg:

```python
# Start logging to the given file in append mode.
import os
from time import strftime
f = os.path.join(c.TerminalIPythonApp.ipython_dir, strftime('%Y-%m-%d')+".py")
c.TerminalInteractiveShell.logappend = f
```

which completely breaks in current `master` code

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014

Merge pull request #2102 from RuiPereira/fixlog
Fix logging on interactive shell.

Add a missing string format code in `init_logs()` and move `init_logstart()` after `init_magics()`, to fix dependency issues.

Fixes the case where a log file is given in `ipython_config.py`, eg:

```python
# Start logging to the given file in append mode.

import os
from time import strftime
f = os.path.join(c.TerminalIPythonApp.ipython_dir, strftime('%Y-%m-%d')+".py")
c.TerminalInteractiveShell.logappend = f
```

which completely breaks in current `master` code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment