summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-04-30 14:57:31 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-04 10:40:22 +0100
commit4e23b22bdf7b0e1fd16c7e53b6a7232c9c92ce95 (patch)
tree7376e929dc48abe697fd645ec8fd69c2784f9070 /scripts
parenta210e28bb3fd5433ebecf50e218fc548013b35dc (diff)
downloadopenembedded-core-contrib-4e23b22bdf7b0e1fd16c7e53b6a7232c9c92ce95.tar.gz
openembedded-core-contrib-4e23b22bdf7b0e1fd16c7e53b6a7232c9c92ce95.tar.bz2
openembedded-core-contrib-4e23b22bdf7b0e1fd16c7e53b6a7232c9c92ce95.zip
wic: add global debug option
Add a global --debug option to assist debugging. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/wic5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/wic b/scripts/wic
index a3c0f731d9..017ef99dda 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -501,6 +501,9 @@ subcommands = {
def init_parser(parser):
parser.add_argument("--version", action="version",
version="%(prog)s {version}".format(version=__version__))
+ parser.add_argument("-D", "--debug", dest="debug", action="store_true",
+ default=False, help="output debug information")
+
subparsers = parser.add_subparsers(dest='command', help=hlp.wic_usage)
for subcmd in subcommands:
subparser = subparsers.add_parser(subcmd, help=subcommands[subcmd][2])
@@ -514,6 +517,8 @@ def main(argv):
init_parser(parser)
args = parser.parse_args(argv)
+ if args.debug:
+ logger.setLevel(logging.DEBUG)
if "command" in vars(args):
if args.command == "help":