@@ -18,7 +18,8 @@ import (
1818
1919var (
2020 // 开启命令行的调试模式
21- DebugFlag bool
21+ DebugFlag bool
22+ DeepDebugInfo bool
2223
2324 // qshell 版本信息, qshell -v
2425 VersionFlag bool
@@ -69,6 +70,7 @@ func init() {
6970 cobra .OnInitialize (initConfig )
7071
7172 RootCmd .PersistentFlags ().BoolVarP (& DebugFlag , "debug" , "d" , false , "debug mode" )
73+ RootCmd .PersistentFlags ().BoolVarP (& DeepDebugInfo , "ddebug" , "D" , false , "deep debug mode" )
7274 RootCmd .PersistentFlags ().BoolVarP (& VersionFlag , "version" , "v" , false , "show version" )
7375 RootCmd .PersistentFlags ().StringVarP (& cfgFile , "config" , "C" , "" , "config file (default is $HOME/.qshell.json)" )
7476 RootCmd .PersistentFlags ().BoolVarP (& local , "local" , "L" , false , "use current directory as config file path" )
@@ -83,10 +85,15 @@ func initConfig() {
8385 //set qshell user agent
8486 storage .UserAgent = UserAgent ()
8587
88+ if DeepDebugInfo {
89+ DebugFlag = true
90+ }
8691 //parse command
8792 if DebugFlag {
8893 logs .SetLevel (logs .LevelDebug )
8994 client .TurnOnDebug ()
95+ // master 已合并, v7.5.0 分支没包含次参数,等待 v7.5.1
96+ // client.DeepDebugInfo = DeepDebugInfo
9097 } else {
9198 logs .SetLevel (logs .LevelInformational )
9299 }
0 commit comments