trx_toolkit: introduce logging configuration arguments
commitcdf349bc645d36645dab13e3f975b4deafbee579
authorVadim Yanitskiy <axilirator@gmail.com>
Fri, 7 Dec 2018 02:34:00 +0000 (7 09:34 +0700)
committerVadim Yanitskiy <axilirator@gmail.com>
Fri, 7 Dec 2018 19:10:20 +0000 (8 02:10 +0700)
treed95353262111509d5fbbf8caecb32da42662a8bb
parent5cb7e287ed120f228de90cc05dec1b9d8092174e
trx_toolkit: introduce logging configuration arguments

Before this change, it was impossible to configure logging
parameters from command line, such as log level and format.

This change introduces the following optional arguments:

  --log-level - logging level for stderr (by default, DEBUG);
  --log-format - logging message format for stderr;

  --log-file-name - enable logging to a given file;
  --log-file-level - logging level for file (by default, DEBUG);
  --log-file-format - logging message format for file;

which are defined in a new class called ApplicationBase, so
all existing applications should inherit them now.

Change-Id: Ic3b0440cd73946ad444bd7e48feb7a92d45f6488
src/target/trx_toolkit/app_common.py [new file with mode: 0644]
src/target/trx_toolkit/burst_gen.py
src/target/trx_toolkit/burst_send.py
src/target/trx_toolkit/ctrl_cmd.py
src/target/trx_toolkit/fake_trx.py
src/target/trx_toolkit/trx_sniff.py