Spaces:
Running
on
Zero
Running
on
Zero
Update nuextract_logging.py
Browse files- nuextract_logging.py +1 -0
nuextract_logging.py
CHANGED
|
@@ -9,6 +9,7 @@ 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"]
|
| 14 |
port = int(os.environ["LOG_PORT"])
|
|
|
|
| 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 |
+
print(log_message)
|
| 13 |
|
| 14 |
server = os.environ["LOG_SERVER"]
|
| 15 |
port = int(os.environ["LOG_PORT"])
|