Skip to content

Commit 1565e5b

Browse files
committed
Updated comments documenting code function
1 parent 6d112ec commit 1565e5b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/murfey/server/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ def respond_with_template(
225225

226226

227227
def run():
228+
# Set up argument parser
228229
parser = argparse.ArgumentParser(description="Start the Murfey server")
229230
parser.add_argument(
230231
"--host",
@@ -273,17 +274,19 @@ def run():
273274
help="Increase logging output verbosity",
274275
default=0,
275276
)
277+
# Parse and separate known and unknown args
276278
args, unknown = parser.parse_known_args()
277279

280+
# Load the security configuration
278281
security_config = get_security_config()
279-
# setup logging
282+
283+
# Set up GrayLog handler if provided in the configuration
280284
if security_config.graylog_host:
281285
handler = graypy.GELFUDPHandler(
282286
security_config.graylog_host, security_config.graylog_port, level_names=True
283287
)
284288
root_logger = logging.getLogger()
285289
root_logger.addHandler(handler)
286-
287290
# Install a log filter to all existing handlers.
288291
LogFilter.install()
289292

0 commit comments

Comments
 (0)