Skip to content

Commit 254b54c

Browse files
authored
Merge pull request #40 from NYU-RTS/logging_format_improve
Log format rework
2 parents 10e91de + 871c1f8 commit 254b54c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

coldfront/config/logging.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
from django.contrib.messages import constants as messages
22
from coldfront.core.utils.common import import_from_settings
3+
import socket
34

45
# ------------------------------------------------------------------------------
56
# ColdFront logging config
67
# ------------------------------------------------------------------------------
78

89
LOG_FILE = import_from_settings("COLDFRONT_DJANGO_LOG_FILE")
10+
HOSTNAME = socket.gethostname()
911

1012
MESSAGE_TAGS = {
1113
messages.DEBUG: "info",
@@ -21,7 +23,7 @@
2123
"root": {"level": "INFO", "handlers": ["file"]},
2224
"formatters": {
2325
"standard": {
24-
"format": "{levelname} {asctime} {module} {process:d} {thread:d} {message}",
26+
"format": "{levelname} {asctime} {HOSTNAME} {module} {process:d} {message}",
2527
"style": "{",
2628
},
2729
},

0 commit comments

Comments
 (0)