0) Complete Docker build scriptes. 1) Refactor storage dir struct for release. 2) Add a common 'user_config' model. 3)More friendly CLI experience
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import daemon
|
||||
from time import sleep
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
logging.basicConfig(filename="daemon_test.log",filemode="w",encoding='utf-8',force=True,
|
||||
level=logging.INFO,
|
||||
format='[%(asctime)s]%(name)s[%(levelname)s]: %(message)s')
|
||||
|
||||
def main_program():
|
||||
while True:
|
||||
logger.info("hello world")
|
||||
sleep(1)
|
||||
|
||||
with daemon.DaemonContext():
|
||||
main_program()
|
||||
Reference in New Issue
Block a user