summaryrefslogtreecommitdiff
path: root/logger.py
diff options
context:
space:
mode:
Diffstat (limited to 'logger.py')
-rw-r--r--logger.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/logger.py b/logger.py
new file mode 100644
index 0000000..2ec5bb8
--- /dev/null
+++ b/logger.py
@@ -0,0 +1,12 @@
+#!/usr/bin/python
+
+class log():
+ def timestamp(self):
+ return time.strftime('%a %D %H:%M:%S ')
+ def __init__(self,logname):
+ self.logname=logname
+ self.log("log started")
+ def log(self,entry):
+ f=open(self.logname,"a")
+ f.write(self.timestamp()+entry+'\n')
+ f.close() \ No newline at end of file