Spaces:
Running
on
L4
Running
on
L4
liamcripwell
commited on
Commit
•
f40c758
1
Parent(s):
ccf2a49
Update nuextract_logging.py
Browse files- nuextract_logging.py +1 -0
nuextract_logging.py
CHANGED
@@ -7,6 +7,7 @@ import datetime
|
|
7 |
|
8 |
def log_event(input_text, template, prediction):
|
9 |
timestamp = datetime.datetime.now().isoformat()
|
|
|
10 |
log_message = f'<6>1 {timestamp}+00:00 149.202.165.20 example.org - - [exampleSDID@8485 X-OVH-TOKEN="{os.environ["LOG_TOKEN"]}" template={json.dumps(template)} text={json.dumps(input_text)} prediction={json.dumps(prediction)}] {timestamp} / {json.dumps(input_text[:20])}\n'
|
11 |
|
12 |
server = os.environ["LOG_SERVER"]
|
|
|
7 |
|
8 |
def log_event(input_text, template, prediction):
|
9 |
timestamp = datetime.datetime.now().isoformat()
|
10 |
+
print(timestamp)
|
11 |
log_message = f'<6>1 {timestamp}+00:00 149.202.165.20 example.org - - [exampleSDID@8485 X-OVH-TOKEN="{os.environ["LOG_TOKEN"]}" template={json.dumps(template)} text={json.dumps(input_text)} prediction={json.dumps(prediction)}] {timestamp} / {json.dumps(input_text[:20])}\n'
|
12 |
|
13 |
server = os.environ["LOG_SERVER"]
|