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 data race with logging #1215

Merged
merged 3 commits into from
Feb 14, 2024
Merged

Fix data race with logging #1215

merged 3 commits into from
Feb 14, 2024

Commits on Feb 14, 2024

  1. Remove the formatter

    The log formatter causes two issues:
    1. When we use the loki output, it can cause a race condition since the
       loki hook works with the entry (the log message and metadata)
       asynchronously, which means that while the hook reads the entry, the
       formatter could be amending the same entry. The entry is not thread
       safe.
    2. The formatter is only used in one place, which is when writing the
       output from console.log that is used in the website under test. This
       change could safely be moved to where it's used, which also makes it
       clear how the console message is formatted before being logged.
    ankur22 committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    d2617eb View commit details
    Browse the repository at this point in the history
  2. Use the logger instead of the serializer

    The serializer doesn't do anything new now that the formatter has been
    removed, so use the logger.
    ankur22 committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    af10f43 View commit details
    Browse the repository at this point in the history
  3. Remove the serializer

    The serializer isn't needed since all it does is create a clone of the
    existing logger.
    ankur22 committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    befcc00 View commit details
    Browse the repository at this point in the history