(self, home_dir, logfname='Logger.log', loghead=u'',
logmode='over')
| 27 | """A Logfile class with different policies for file creation""" |
| 28 | |
| 29 | def __init__(self, home_dir, logfname='Logger.log', loghead=u'', |
| 30 | logmode='over'): |
| 31 | |
| 32 | # this is the full ipython instance, we need some attributes from it |
| 33 | # which won't exist until later. What a mess, clean up later... |
| 34 | self.home_dir = home_dir |
| 35 | |
| 36 | self.logfname = logfname |
| 37 | self.loghead = loghead |
| 38 | self.logmode = logmode |
| 39 | self.logfile = None |
| 40 | |
| 41 | # Whether to log raw or processed input |
| 42 | self.log_raw_input = False |
| 43 | |
| 44 | # whether to also log output |
| 45 | self.log_output = False |
| 46 | |
| 47 | # whether to put timestamps before each log entry |
| 48 | self.timestamp = False |
| 49 | |
| 50 | # activity control flags |
| 51 | self.log_active = False |
| 52 | |
| 53 | # logmode is a validated property |
| 54 | def _set_mode(self,mode): |
nothing calls this directly
no outgoing calls
no test coverage detected