You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
627 B
Python
32 lines
627 B
Python
9 months ago
|
from base.goupibutong import Goupi
|
||
|
from loguru import logger
|
||
|
import time
|
||
|
|
||
|
logger.add('huanbu.log', rotation='100 MB', level='DEBUG', compression='tar.gz', colorize=True, enqueue=True)
|
||
|
logger.debug("That's it, beautiful and simple logging!")
|
||
|
|
||
|
|
||
|
def logout(interval=0):
|
||
|
butonghandler = Goupi()
|
||
|
for i in range(1000000000):
|
||
|
juzi = butonghandler.butong(10)
|
||
|
logger.info(juzi)
|
||
|
time.sleep(interval)
|
||
|
|
||
|
|
||
|
def func(a, b):
|
||
|
return a / b
|
||
|
|
||
|
|
||
|
def nested(c):
|
||
|
try:
|
||
|
func(5, c)
|
||
|
except Exception as e:
|
||
|
logger.exception(e)
|
||
|
|
||
|
|
||
|
# nested(0)
|
||
|
if __name__ == '__main__':
|
||
|
# logout()
|
||
|
nested(0)
|