Skip to content

Conversation

joeyballentine
Copy link
Member

The biggest thing I dislike about this is the amount of code that now has to run per-log. This could wind up being a minor performance impact if we have a lot of logging

@RunDevelopment
Copy link
Member

RunDevelopment commented Mar 9, 2024

One last thing: I think it would be a good idea to give the logged message a prefix, so we know it's from the worker. Maybe something like [sanic] [stuff] [INFO] Worker: <message>. What do you think?

@joeyballentine
Copy link
Member Author

I already added [Executor] to it

match_obj = re.match(SANIC_LOG_REGEX, stripped_line)
if match_obj is not None:
log_level, message = match_obj.groups()
message = f"[Executor] {message.strip()}"
Copy link
Member Author

Choose a reason for hiding this comment

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

here

@joeyballentine
Copy link
Member Author

Gonna merge this since I need it for fixing #2646 and I don't think there's anything left to do. If you wanna change the message, just make a followup PR or reply to this and I'll do it.

@joeyballentine joeyballentine merged commit 7a8b981 into main Mar 10, 2024
@joeyballentine joeyballentine deleted the fix-executor-logs branch March 10, 2024 01: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