In [1]: %logstart
Activating auto-logging. Current session state plus future input saved.
Filename : ipython_log.py
Mode : rotate
Output logging : False
Raw input log : False
Timestamping : False
State : active
In [2]: x = 42
In [3]: print(x * 3.2)
134.4
In [4]: %logoff
Switching logging OFF
# IPython log file
get_ipython().magic('logstart')
x = 42
print(x * 3.2)
get_ipython().magic('logoff')