You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/04/30 12:32:42 UTC

[GitHub] [camel-k] astefanutti commented on a change in pull request #2252: Added support for the json log format via the logging trait

astefanutti commented on a change in pull request #2252:
URL: https://github.com/apache/camel-k/pull/2252#discussion_r623840269



##########
File path: pkg/trait/logging.go
##########
@@ -35,12 +38,18 @@ type loggingTrait struct {
 	BaseTrait `property:",squash"`
 	// Colorize the log output
 	Color *bool `property:"color" json:"color,omitempty"`
+	// Output the log in json format
+	Json *bool `property:"json" json:"json,omitempty"`
+	// Enable "pretty printing" of the json log
+	JsonPrettyPrint *bool `property:"json.pretty-print" json:"json.pretty-print,omitempty"`

Review comment:
       To follow existing conventions, I'd suggest:
   
   ```suggestion
   	JsonPrettyPrint *bool `property:"json-pretty-print" json:"jsonPrettyPrint,omitempty"`
   ```
   
   Another suggestion would be to renamed it to `PrettyPrint` straight, with a mention that's only applicable when JSON output is enabled.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org