We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b31871f commit 703033cCopy full SHA for 703033c
python/snipcode.md
@@ -1,6 +1,8 @@
1
独立日志
2
3
- logging.basicConfig(filename=os.path.join(os.getcwd(), 'log.log'), level = logging.DEBUG)
+ logfile = '/data/log/login_mon/%s.log' % datetime.now().strftime('%Y-%m-%d')
4
+ logging.basicConfig(filename=logfile, level=logging.INFO, format='%(asctime)s - %(message)s')
5
+ logging.getLogger().addHandler(logging.StreamHandler())
6
7
def init_logger(log_filename, level='info', console=False):
8
import logging.handlers
0 commit comments