Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Side by Side Diff: tools/android/loading/cloud/backend/worker.py

Issue 2039723003: tools/android/loading Add timestamps to backend logs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import argparse 5 import argparse
6 import json 6 import json
7 import logging 7 import logging
8 import os 8 import os
9 import sys 9 import sys
10 10
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 # any time. 198 # any time.
199 199
200 if __name__ == '__main__': 200 if __name__ == '__main__':
201 parser = argparse.ArgumentParser( 201 parser = argparse.ArgumentParser(
202 description='ComputeEngine Worker for Clovis') 202 description='ComputeEngine Worker for Clovis')
203 parser.add_argument('--config', required=True, 203 parser.add_argument('--config', required=True,
204 help='Path to the configuration file.') 204 help='Path to the configuration file.')
205 args = parser.parse_args() 205 args = parser.parse_args()
206 206
207 # Configure logging. 207 # Configure logging.
208 logging.basicConfig(level=logging.WARNING) 208 logging.basicConfig(level=logging.WARNING,
209 format='[%(asctime)s][%(levelname)s] %(message)s',
mattcary 2016/06/06 14:50:23 Do you know if this ends up matching the same time
droger 2016/06/06 15:25:24 It seems it is the same, but this is probably by c
210 datefmt='%y-%m-%d %H:%M:%S')
209 worker_logger = logging.getLogger('worker') 211 worker_logger = logging.getLogger('worker')
210 worker_logger.setLevel(logging.INFO) 212 worker_logger.setLevel(logging.INFO)
211 213
212 worker_logger.info('Reading configuration') 214 worker_logger.info('Reading configuration')
213 with open(args.config) as config_json: 215 with open(args.config) as config_json:
214 worker = Worker(json.load(config_json), worker_logger) 216 worker = Worker(json.load(config_json), worker_logger)
215 worker.Start() 217 worker.Start()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698