File tree 2 files changed +10
-4
lines changed
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -64,9 +64,16 @@ Miscellaneous
64
64
65
65
These environment variables are optional:
66
66
67
+ * **LOG_FORMAT **
68
+
69
+ The Python logging `format string
70
+ <https://docs.python.org/3/library/logging.html#logrecord-attributes> `_
71
+ to use. Defaults to `%(levelname)s:%(name)s:%(message)s `.
72
+
67
73
* **ALLOW_ROOT **
68
74
69
- Set this environment variable to anything non-empty to allow running ElectrumX as root.
75
+ Set this environment variable to anything non-empty to allow running
76
+ ElectrumX as root.
70
77
71
78
* **NET **
72
79
Original file line number Diff line number Diff line change 18
18
19
19
def main ():
20
20
'''Set up logging and run the server.'''
21
- logging .basicConfig (level = logging .INFO ,
22
- format = '%(asctime)s %(levelname)-7s %(message)-100s '
23
- '[%(filename)s:%(lineno)d]' )
21
+ log_fmt = Env .default ('LOG_FORMAT' , '%(levelname)s:%(name)s:%(message)s' )
22
+ logging .basicConfig (level = logging .INFO , format = log_fmt )
24
23
logging .info ('ElectrumX server starting' )
25
24
try :
26
25
controller = Controller (Env ())
You can’t perform that action at this time.
0 commit comments