ansible / azure-aap-deployment-driver

Apache License 2.0
2 stars 13 forks source link

Fix order of logging messages #110

Closed tznamena closed 9 months ago

tznamena commented 9 months ago

This PR fixes a minor issue with order of trace messages and also one typo in struct field. Before this PR the engine would log following messages at the end, when engine is exiting:

time="2024-01-16 22:47:10" level=trace msg="Deleting SSO client." func="server/sso.(*SsoManager).DeleteAcsClient" file="ssoManager.go:93"
time="2024-01-16 22:47:10" level=trace msg="Getting SSO client API access token." func=server/sso.GetAcsClient file="acsclient.go:70"
time="2024-01-16 22:47:10" level=trace msg="Initialized SSO client." func=server/sso.GetAcsClient file="acsclient.go:77"

These look to come out in wrong order but they aren't. By moving them into better locations in the logging output looks better:

time="2024-01-18 00:51:10" level=trace msg="Getting SSO client API access token." func=server/sso.GetAcsClient file="acsclient.go:71"
time="2024-01-18 00:51:10" level=trace msg="Got SSO client." func=server/sso.GetAcsClient file="acsclient.go:78"
time="2024-01-18 00:51:10" level=trace msg="Deleting SSO client." func="server/sso.(*SsoManager).DeleteAcsClient" file="ssoManager.go:95"