forked from M-Labs/artiq
1
0
Fork 0

frontend/coretool: verbosity control

This commit is contained in:
Sebastien Bourdeauducq 2015-12-20 23:17:31 +08:00
parent 5769107936
commit 2ae63570dd
1 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,7 @@
import argparse import argparse
import struct import struct
from artiq.tools import verbosity_args, init_logger
from artiq.master.databases import DeviceDB from artiq.master.databases import DeviceDB
from artiq.master.worker_db import DeviceManager from artiq.master.worker_db import DeviceManager
from artiq.coredevice.analyzer import decode_dump, messages_to_vcd from artiq.coredevice.analyzer import decode_dump, messages_to_vcd
@ -11,6 +12,8 @@ from artiq.coredevice.analyzer import decode_dump, messages_to_vcd
def get_argparser(): def get_argparser():
parser = argparse.ArgumentParser(description="ARTIQ core device " parser = argparse.ArgumentParser(description="ARTIQ core device "
"remote access tool") "remote access tool")
verbosity_args(parser)
parser.add_argument("--device-db", default="device_db.pyon", parser.add_argument("--device-db", default="device_db.pyon",
help="device database file (default: '%(default)s')") help="device database file (default: '%(default)s')")
@ -58,6 +61,7 @@ def get_argparser():
def main(): def main():
args = get_argparser().parse_args() args = get_argparser().parse_args()
init_logger(args)
device_mgr = DeviceManager(DeviceDB(args.device_db)) device_mgr = DeviceManager(DeviceDB(args.device_db))
try: try:
comm = device_mgr.get("comm") comm = device_mgr.get("comm")