From 6b99a181a753be679c9c469c6077631e0ad6cd89 Mon Sep 17 00:00:00 2001 From: dnomd343 Date: Mon, 1 Aug 2022 11:45:17 +0800 Subject: [PATCH] style: optimize log output --- Tester/__init__.py | 8 ++++---- test.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Tester/__init__.py b/Tester/__init__.py index ef7c3d2..0f9c949 100644 --- a/Tester/__init__.py +++ b/Tester/__init__.py @@ -119,16 +119,16 @@ def loadCert(host: str = 'proxyc.net', remark: str = 'ProxyC'): caKey = loadPath('proxyc_%s_ca_key.pem' % certFlag) cert = loadPath('proxyc_%s_cert.pem' % certFlag) key = loadPath('proxyc_%s_cert_key.pem' % certFlag) - logging.critical('Create self-signed certificate') + logging.critical('Load self-signed certificate') os.system('mkdir -p %s' % Settings['workDir']) # create work directory - logging.critical('Create CA certificate and key') + logging.critical('Creating CA certificate and key...') os.system(' '.join(['mad', 'ca'] + [ '--ca', caCert, '--key', caKey, '--commonName', remark, '--organization', remark, '--organizationUnit', remark, ])) - logging.critical('Signing certificate') + logging.critical('Signing certificate...') os.system(' '.join(['mad', 'cert'] + [ '--ca', caCert, '--ca_key', caKey, '--cert', cert, '--key', key, @@ -136,7 +136,7 @@ def loadCert(host: str = 'proxyc.net', remark: str = 'ProxyC'): '--organization', remark, '--organizationUnit', remark, ])) - logging.critical('Install CA certificate') + logging.critical('Installing CA certificate...') os.system('cat %s >> /etc/ssl/certs/ca-certificates.crt' % caCert) Settings['host'] = host Settings['cert'] = cert diff --git a/test.py b/test.py index 26683ba..9c030c8 100755 --- a/test.py +++ b/test.py @@ -49,7 +49,7 @@ logging.critical('TEST ITEM: ' + ('all' if testItem is None else testItem)) logging.critical('FILTER: %s' % testFilter) logging.critical('URL: ' + testUrl) logging.critical('THREAD NUMBER: %i' % threadNum) -logging.critical('TEST START') +logging.critical('-------------------------------- TEST START --------------------------------') if testItem is not None: Tester.test(Tester.entry[testItem], threadNum, testUrl, testFilter) else: @@ -58,4 +58,4 @@ else: continue logging.critical('TEST ITEM -> ' + item) Tester.test(Tester.entry[item], threadNum, testUrl, testFilter) -logging.critical('TEST COMPLETE') +logging.critical('-------------------------------- TEST COMPLETE --------------------------------')