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

[Backport master] Fix setup logging #2573

Merged
merged 1 commit into from
Jan 6, 2025
Merged

Conversation

c2c-bot-gis-ci-2
Copy link

Backport of #2555

Error on cherry picking:
Error on backporting to branch master, error on cherry picking 494482f:

To continue do:
git fetch && git checkout backport/2555-to-master && git reset --hard HEAD^
git cherry-pick 494482f
git cherry-pick 3d6030c
git push origin backport/2555-to-master --force

To avoid:
```
  File "/usr/lib/python3.12/logging/__init__.py", line 1539, in info
    self._log(INFO, msg, args, **kwargs)
  File "/usr/lib/python3.12/logging/__init__.py", line 1684, in _log
    self.handle(record)
  File "/usr/lib/python3.12/logging/__init__.py", line 1700, in handle
    self.callHandlers(record)
  File "/venv/lib/python3.12/site-packages/sentry_sdk/integrations/logging.py", line 98, in sentry_patched_callhandlers
    return old_callhandlers(self, record)
Message: '[%s] %r'
Arguments: ('cached since 570.4s ago', {'status': 'ERROR', 'status_1': 'PENDING', 'created_at_1': datetime.datetime(2024, 12, 8, 16, 4, 28, 898425, tzinfo=datetime.timezone.utc)})
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.12/logging/__init__.py", line 1163, in emit
    stream.write(msg + self.terminator)
    ^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'write'
```
@sbrunner sbrunner force-pushed the backport/2555-to-master branch from 5e06b5e to 565dcf6 Compare January 6, 2025 13:33
@sbrunner sbrunner merged commit 556aa12 into master Jan 6, 2025
7 checks passed
@sbrunner sbrunner deleted the backport/2555-to-master branch January 6, 2025 13:43
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.

2 participants