liamcripwell commited on
Commit
3e27916
1 Parent(s): 0ad149f

Update nuextract_logging.py

Browse files
Files changed (1) hide show
  1. nuextract_logging.py +1 -1
nuextract_logging.py CHANGED
@@ -6,7 +6,7 @@ import datetime
6
 
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
  print(log_message)
 
6
 
7
 
8
  def log_event(input_text, template, prediction):
9
+ timestamp = datetime.datetime.now(datetime.timezone.utc).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)