Skip to content
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

Initial implementation of state export log. #2886

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

mitchell-as
Copy link
Contributor

@mitchell-as mitchell-as commented Nov 20, 2023

StoryDX-1593 Access logs without specifying PID

@mitchell-as mitchell-as requested a review from MDrakos November 20, 2023 23:25
@mitchell-as mitchell-as marked this pull request as ready for review November 20, 2023 23:25
Copy link
Member

@MDrakos MDrakos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, just one question.

}
for _, file := range logFiles {
if regex.MatchString(file) {
timestamp, err := strconv.Atoi(regex.FindStringSubmatch(file)[1])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the regex.MatchString guarantee that we will find a second group? If not the indexing of the slice here is a potential panic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if there is a match, the capture from the pattern guarantees a valid index.

@mitchell-as mitchell-as requested a review from MDrakos November 22, 2023 14:21
@mitchell-as mitchell-as merged commit f1b3545 into version/0-43-0-RC1 Nov 22, 2023
7 checks passed
@mitchell-as mitchell-as deleted the mitchell/dx-1593 branch November 22, 2023 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants