12345678910111213141516 |
- import datetime
- class log_list():
- def __init__(self):
- self.log_list = list()
- def add_item(self,*args):
- args = [str(i) for i in args]
- item = " ".join(args)
- item = str(datetime.datetime.now())+" , "+str(item)
- self.log_list.append(item)
- if len(self.log_list) > 100:
- self.log_list.pop(0)
- def get_log_list(self):
- return self.log_list
|