mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-03 06:49:38 +08:00
feat: global set log with pretty console
This commit is contained in:
@@ -19,6 +19,10 @@ var boomCmd = &cobra.Command{
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
hrp.SetLogLevel(logLevel)
|
||||
if !logJSON {
|
||||
hrp.SetLogPretty()
|
||||
}
|
||||
|
||||
var paths []hrp.ITestCase
|
||||
for _, arg := range args {
|
||||
paths = append(paths, &hrp.TestCasePath{Path: arg})
|
||||
|
||||
@@ -16,6 +16,10 @@ var har2caseCmd = &cobra.Command{
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
hrp.SetLogLevel(logLevel)
|
||||
if !logJSON {
|
||||
hrp.SetLogPretty()
|
||||
}
|
||||
|
||||
var outputFiles []string
|
||||
for _, arg := range args {
|
||||
var outputPath string
|
||||
|
||||
@@ -17,6 +17,10 @@ var runCmd = &cobra.Command{
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
hrp.SetLogLevel(logLevel)
|
||||
if !logJSON {
|
||||
hrp.SetLogPretty()
|
||||
}
|
||||
|
||||
var paths []hrp.ITestCase
|
||||
for _, arg := range args {
|
||||
paths = append(paths, &hrp.TestCasePath{Path: arg})
|
||||
|
||||
Reference in New Issue
Block a user