summaryrefslogtreecommitdiff
path: root/logger.py
blob: ede1d8b1c0cd69e6792dbf5c8611905a89e64fa8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/python

import sys,time

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()