@@ -31,7 +31,6 @@ Find more information at:
3131func NewCmdRoot () * cobra.Command {
3232 logLevel := enum .NewEnum ([]string {"trace" , "debug" , "info" , "warn" , "error" }, "info" )
3333 logFormat := enum .NewEnum ([]string {"text" , "json" }, "text" )
34- noColor := false
3534 logConsole := false
3635 noLogFile := false
3736 logFileName := "cloudquery.log"
@@ -79,7 +78,7 @@ func NewCmdRoot() *cobra.Command {
7978 if logFormat .String () == "text" {
8079 writers = append (writers , zerolog.ConsoleWriter {
8180 Out : os .Stderr ,
82- NoColor : noColor ,
81+ NoColor : true ,
8382 FormatTimestamp : formatTimestampUtcRfc3339 ,
8483 })
8584 } else {
@@ -110,6 +109,7 @@ func NewCmdRoot() *cobra.Command {
110109 return err
111110 }
112111 }
112+
113113 return nil
114114 },
115115 PersistentPostRun : func (cmd * cobra.Command , args []string ) {
@@ -121,7 +121,11 @@ func NewCmdRoot() *cobra.Command {
121121
122122 cmd .PersistentFlags ().String ("data-dir" , "./.cq" , "set persistent data directory (env: CQ_DATA_DIR)" )
123123
124- cmd .PersistentFlags ().String ("color" , "auto" , "Enable colorized output (on, off, auto)" )
124+ cmd .PersistentFlags ().String ("color" , "auto" , "Enable colorized output when log-console is set (on, off, auto)" )
125+ err := cmd .PersistentFlags ().MarkDeprecated ("color" , "console logs are always colorless" )
126+ if err != nil {
127+ panic (err )
128+ }
125129
126130 // Logging Flags
127131 cmd .PersistentFlags ().BoolVar (& logConsole , "log-console" , false , "enable console logging" )
0 commit comments