File tree 1 file changed +6
-6
lines changed 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 7
7
# See the file "LICENCE" for information about the copyright
8
8
# and warranty status of this software.
9
9
10
- ''' Script to kick off the server.'''
10
+ """ Script to kick off the server."""
11
11
12
12
import asyncio
13
13
import logging
@@ -24,12 +24,12 @@ load_dotenv()
24
24
25
25
26
26
def main ():
27
- ''' Set up logging and run the server.'''
27
+ """ Set up logging and run the server."""
28
28
log_fmt = Env .default ('LOG_FORMAT' , '%(levelname)s:%(name)s:%(message)s' )
29
29
log_level = Env .default ('LOG_LEVEL' , 'INFO' ).upper ()
30
30
log_path = Env .default ('LOG_PATH' , None )
31
31
if log_path :
32
- exist = os .path .exists (log_path )
32
+ exist = os .path .exists (log_path )
33
33
if not exist :
34
34
os .makedirs (log_path )
35
35
handler = logging .handlers .WatchedFileHandler (log_path + "/electrumx.log" )
@@ -48,9 +48,9 @@ def main():
48
48
controller = Controller (env )
49
49
asyncio .run (controller .run ())
50
50
except KeyboardInterrupt :
51
- logger .info ('ElectrumX server terminated (normally) before initialized ' )
52
- except Exception :
53
- logger .exception ('ElectrumX server terminated abnormally' )
51
+ logger .info ('ElectrumX server terminated by keyboard interrupt ' )
52
+ except Exception as e :
53
+ logger .exception (f 'ElectrumX server terminated abnormally: { e } ' )
54
54
else :
55
55
logger .info ('ElectrumX server terminated normally' )
56
56
You can’t perform that action at this time.
0 commit comments