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

fix GetLastLine core #1996

Open
wants to merge 10 commits into
base: 2.1
Choose a base branch
from
Open

fix GetLastLine core #1996

wants to merge 10 commits into from

Conversation

quzard
Copy link
Collaborator

@quzard quzard commented Dec 27, 2024

  • 修复了因特定日志条目导致的崩溃问题
    例如:\n2021-08-25T07:00:00.000000000Z stdout F xxx 导致的日志崩溃。

  • 优化了在行尾多行模式匹配到 "xxx\nend" 时的日志回退逻辑
    这种情况下应该因为end没有换行符,应该回退所有日志

  • 解决了行尾多行模式下当 containerd 日志以 "xxx\nend\npart log" 格式出现时的日志回退问题
    例如,在遇到以下日志序列时,如果 "end log" 匹配成功,则应将日志回退至 "2021-08-25T07:00:00.000000000Z stdout F end log" 的位置,回退行数为3行:

    2021-08-25T07:00:00.000000000Z stdout F unmatch log
    2021-08-25T07:00:00.000000000Z stdout F unmatch log
    2021-08-25T07:00:00.000000000Z stdout F unmatch log
    2021-08-25T07:00:00.000000000Z stdout F end log
    2021-08-25T07:00:00.000000000Z stdout P unmatch log
    2021-08-25T07:00:00.000000000Z stdout P unmatch log
    2021-08-25T07:00:00.000000000Z stdout P unmatch log
    

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.

1 participant