build the basic frame
This commit is contained in:
18
py12306/log/base.py
Normal file
18
py12306/log/base.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from py12306.helpers.func import *
|
||||
|
||||
|
||||
class BaseLog:
|
||||
logs = []
|
||||
|
||||
@classmethod
|
||||
def add_log(cls, content):
|
||||
self = cls()
|
||||
self.logs.append(content)
|
||||
return self
|
||||
|
||||
@classmethod
|
||||
def flush(cls):
|
||||
self = cls()
|
||||
for i in self.logs:
|
||||
print(i)
|
||||
# print(self.logs)
|
||||
Reference in New Issue
Block a user