-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance log format using zapr logger. #195
Conversation
Signed-off-by: morvencao <[email protected]>
625e24a
to
6f47e44
Compare
/assign @qiujian16 @clyang82 @skeeey |
@@ -24,18 +23,17 @@ func NewMigrationCommand() *cobra.Command { | |||
} | |||
|
|||
dbConfig.AddFlags(cmd.PersistentFlags()) | |||
cmd.PersistentFlags().AddGoFlagSet(flag.CommandLine) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you remove it? We do not need it anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the flags is added into root command, so that all sub comands can share it.
flags.SetNormalizeFunc(utilflag.WordSepNormalizeFunc) | ||
flags.AddGoFlagSet(flag.CommandLine) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is to configure the logs if you remove it in agent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the flags are added into the root command, we can still configure them when we run sub command(maestro migrate/server/agent).
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The following changes are included in the bump; - ensure spec is returned in the status change event when a maestro bundle is being deleted (openshift-online/maestro#225) - support entra auth for postgres (openshift-online/maestro#221) - fix maestro agent resync unstable (openshift-online/maestro#220) - register cloud events metrics(openshift-online/maestro#217) - avoid nil point in go-sdk (openshift-online/maestro#212) - update mqtt lib to resolve mqtt pinger problem (openshift-online/maestro#200) - support print date in log (openshift-online/maestro#195) - avoid race conditions on maestro-agent (openshift-online/maestro#196) - use orphan delete option as default option for read only update strategy (openshift-online/maestro#189)
ref: https://issues.redhat.com/browse/ACM-14209
This PR introduces the following changes:
glog
withklog
Note: Maestro still indirectly depends on
glog
due to the current dependencies ongithub.com/openshift-online/ocm-sdk-go
andgithub.com/openshift-online/ocm-common
, which useglog
.klog
to usezapr
as the backing logger.This setup enables enhanced logging features, including detailed timestamps and structured log output (e.g.,
JSON
format).Before this PR:
After this PR: