-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: log formatting (initial state) #59
base: master
Are you sure you want to change the base?
fix: log formatting (initial state) #59
Conversation
@mrmagicpotato007 can you add issue link in PR, as well as good description for it. |
Issue Link: #49 |
you can edit the PR description and add it there. @mrmagicpotato007 |
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.
will test it
Hi @hash-data is this tested ? can we merge? |
logger.Info("Running sync with state: ") | ||
logger.LogState(state) |
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.
it still not look good while printing
can we do something like :
logger.Info("Running sync with state: ") | |
logger.LogState(state) | |
stateBytes, _ := state.MarshalJSON() | |
logger.Infof("Running sync with state: %s", stateBytes) |
for this you have to change state unmarshaler as well.
as that is not marking HoldsValue to true for each streams.
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.
it will print something like this
{"type":"LOG","log":{"level":"info","message":"Running sync with state: {\"type\":\"STREAM\",\"streams\":[{\"stream\":\"incr1\",\"namespace\":\"incr\",\"sync_mode\":\"\",\"state\":{\"_data\":\"82678109C1000000022B0429296E1404\"}}]}"}}
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.
sure will make the changes accordingly
Description: We identified an issue where the state format is being logged incorrectly at the start of the application. To address this, we are updating the format to align with the logstate function's expected output. This change ensures consistency and improves log readability.
How Has This Been Tested?
tested with empty state
{"type":"STATE","state":null}
tested with state config
{"type":"STATE","state":{"type":"STREAM"}}
Screenshots or Recordings
Issues Link: #49,
#58