mirror of
https://github.com/chipsec/chipsec
synced 2026-06-08 13:31:00 +00:00
Made logging modes selectable
Verbose, HAL and debug logging modes are now each selectable. Signed-off-by: Erik Bjorge <erik.c.bjorge@intel.com>
This commit is contained in:
committed by
BrentHoltsclaw
parent
0e14b2e0b5
commit
3d845d9a4c
+2
-1
@@ -371,6 +371,7 @@ class ChipsecMain:
|
||||
options.add_argument('-m', '--module',dest='_module', help='specify module to run (example: -m common.bios_wp)')
|
||||
options.add_argument('-a','--module_args', nargs='*', dest="_module_argv", help="additional module arguments")
|
||||
options.add_argument('-v','--verbose', help='verbose mode', action='store_true')
|
||||
options.add_argument('--hal', help='HAL mode', action='store_true')
|
||||
options.add_argument('-d','--debug', help='debug mode', action='store_true')
|
||||
options.add_argument('-l','--log', help='output to log file')
|
||||
adv_options = parser.add_argument_group('Advanced Options')
|
||||
@@ -396,8 +397,8 @@ class ChipsecMain:
|
||||
parser.print_help()
|
||||
if self.verbose:
|
||||
logger().VERBOSE = True
|
||||
if self.hal:
|
||||
logger().HAL = True
|
||||
logger().DEBUG = True
|
||||
if self.debug:
|
||||
logger().DEBUG = True
|
||||
if self.log:
|
||||
|
||||
+2
-1
@@ -104,6 +104,7 @@ class ChipsecUtil:
|
||||
options = parser.add_argument_group('Options')
|
||||
options.add_argument('-h', '--help',dest='show_help', help="show this message and exit",action='store_true')
|
||||
options.add_argument('-v','--verbose', help='verbose mode', action='store_true')
|
||||
options.add_argument('--hal', help='HAL mode', action='store_true')
|
||||
options.add_argument('-d','--debug', help='debug mode', action='store_true')
|
||||
options.add_argument('-l','--log', help='output to log file')
|
||||
options.add_argument('-p','--platform',dest='_platform', help='explicitly specify platform code',choices=chipset.Chipset_Code, type=str.upper)
|
||||
@@ -117,8 +118,8 @@ class ChipsecUtil:
|
||||
parser.print_help()
|
||||
if self.verbose:
|
||||
logger().VERBOSE = True
|
||||
if self.hal:
|
||||
logger().HAL = True
|
||||
logger().DEBUG = True
|
||||
if self.debug:
|
||||
logger().DEBUG = True
|
||||
if self.log:
|
||||
|
||||
Reference in New Issue
Block a user