##// END OF EJS Templates
doc fixes to logging
fperez -
r68:716d2805
parent child
Show More
@@ -2,7 +2,7
2 """
2 """
3 Logger class for IPython's logging facilities.
3 Logger class for IPython's logging facilities.
4
4
5 $Id: Logger.py 966 2005-12-29 08:34:07Z fperez $
5 $Id: Logger.py 974 2005-12-29 19:48:33Z fperez $
6 """
6 """
7
7
8 #*****************************************************************************
8 #*****************************************************************************
@@ -160,11 +160,11 which already exists. But you must first start the logging process with
160 print 'Logging has not been activated.'
160 print 'Logging has not been activated.'
161 else:
161 else:
162 state = self.log_active and 'active' or 'temporarily suspended'
162 state = self.log_active and 'active' or 'temporarily suspended'
163 print 'Filename :',self.logfname
163 print 'Filename :',self.logfname
164 print 'Mode :',self.logmode
164 print 'Mode :',self.logmode
165 print 'Output logging:',self.log_output
165 print 'Output logging :',self.log_output
166 print 'Timestamping :',self.timestamp
166 print 'Timestamping :',self.timestamp
167 print 'State :',state
167 print 'State :',state
168
168
169 def log(self, line,continuation=None):
169 def log(self, line,continuation=None):
170 """Write the line to a log and create input cache variables _i*."""
170 """Write the line to a log and create input cache variables _i*."""
@@ -1,7 +1,7
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """Magic functions for InteractiveShell.
2 """Magic functions for InteractiveShell.
3
3
4 $Id: Magic.py 973 2005-12-29 18:51:56Z fperez $"""
4 $Id: Magic.py 974 2005-12-29 19:48:33Z fperez $"""
5
5
6 #*****************************************************************************
6 #*****************************************************************************
7 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
7 # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
@@ -931,9 +931,14 Currently the magic system has the following functions:\n"""
931 -o: log also IPython's output. In this mode, all commands which
931 -o: log also IPython's output. In this mode, all commands which
932 generate an Out[NN] prompt are recorded to the logfile, right after
932 generate an Out[NN] prompt are recorded to the logfile, right after
933 their corresponding input line. The output lines are always
933 their corresponding input line. The output lines are always
934 prepended with a #[Out]# marker, so that the log remains valid
934 prepended with a '#[Out]# ' marker, so that the log remains valid
935 Python code.
935 Python code.
936
936
937 Since this marker is always the same, filtering only the output from
938 a log is very easy, using for example a simple awk call:
939
940 awk -F'#\\[Out\\]# ' '{if($2) {print $2}}' ipython_log.py
941
937 -t: put timestamps before each input line logged (these are put in
942 -t: put timestamps before each input line logged (these are put in
938 comments)."""
943 comments)."""
939
944
General Comments 0
You need to be logged in to leave comments. Login now