# -*- coding: utf-8 -*-
import logging
from wmm.data.tw_stock import TwStock
def initLogging():
FORMAT = '[%(asctime)s][%(levelname)s] %(message)s'
logging.basicConfig(level=logging.DEBUG, format=FORMAT, filename='log/system.log')
def main():
initLogging()
test = TwStock()
test.updateDB()
if __name__ == '__main__':
main()
有一些參數參考
https://docs.python.org/3/library/logging.html
沒有留言:
張貼留言