| Index: appengine/findit/util_scripts/crash_queries/crash_printer/crash_printer.py
|
| diff --git a/appengine/findit/util_scripts/crash_queries/crash_printer/crash_printer.py b/appengine/findit/util_scripts/crash_queries/crash_printer/crash_printer.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..cb8356db241ff8f51259f311a6d4744dceac57a5
|
| --- /dev/null
|
| +++ b/appengine/findit/util_scripts/crash_queries/crash_printer/crash_printer.py
|
| @@ -0,0 +1,29 @@
|
| +# Copyright 2016 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +import functools
|
| +import json
|
| +import logging
|
| +import os
|
| +import sys
|
| +import zlib
|
| +
|
| +from crash.type_enums import CrashClient
|
| +from crash_queries import client_crash_iterator
|
| +
|
| +CRASH_INFO_FIELDS = ['signature', 'platform']
|
| +
|
| +def PrintCrashInfo(crash):
|
| + print '\nCrash %s' % crash['id']
|
| + for crash_info_field in CRASH_INFO_FIELDS:
|
| + print '%s: %s' % (crash_info_field, crash[crash_info_field])
|
| +
|
| +
|
| +def CrashPrinter(client_id,
|
| + start_date, end_date,
|
| + print_func=PrintCrashInfo):
|
| + logging.basicConfig(level=logging.DEBUG)
|
| + client_crash_iterator.IterateClientCrashes(
|
| + client_id, print_func, crash_info_fields=CRASH_INFO_FIELDS,
|
| + start_date=start_date, end_date=end_date)
|
|
|