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

feat(loki): adding multiline support #344

Merged
merged 1 commit into from
Sep 22, 2023
Merged

feat(loki): adding multiline support #344

merged 1 commit into from
Sep 22, 2023

Conversation

abhilashshetty04
Copy link
Contributor

@abhilashshetty04 abhilashshetty04 commented Sep 21, 2023

With multiline support we define starting point of the log block when it gets filtered through logcli parameter.

Every log that we stdout starts with timestamp(with ansi color char now by default) . In Regex1 , \x1b\[2m matches colour unicode pattern. logger adds 2 zero width space also hence Regex has space to match.

We might have uncolored timestamp in future. So In Regex2, we handle that scenario.

Regex1: '^ \x1b[2m(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{6})Z'

Regex2 : '^ (\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{6})Z'

@abhilashshetty04 abhilashshetty04 changed the title feat(loki): adding multiline config support feat(loki): adding multiline support Sep 21, 2023
@tiagolobocastro
Copy link
Contributor

@abhilashshetty04 please add more information to commit explaining what the regex is doing in both cases.

@abhilashshetty04
Copy link
Contributor Author

bors merge

@bors
Copy link
Contributor

bors bot commented Sep 22, 2023

👎 Rejected by too few approved reviews

Copy link
Member

@niladrih niladrih left a comment

Choose a reason for hiding this comment

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

This will require upgrade changes, noted 👍 .

@abhilashshetty04
Copy link
Contributor Author

bors merge

@bors
Copy link
Contributor

bors bot commented Sep 22, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 6f64600 into develop Sep 22, 2023
7 checks passed
@bors bors bot deleted the loki_multiline branch September 22, 2023 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants