tintoy / seqlog

Python logging integration for Seq (https://getseq.net)
https://seqlog.readthedocs.io/
MIT License
17 stars 11 forks source link

always shows line 219 in log in python 3.11 #69

Closed Liquidmasl closed 2 months ago

Liquidmasl commented 7 months ago

Description

all log entries show line 219

What I Did

i traced it back to the basic logging implementation. find_caller() returnes _log() in strucutred loggong.py, line 219

in this line super()._log(level, msg, args, exc_info, extra, stack_info) is called

changing that to super()._log(level, msg, args, exc_info, extra, stack_info, stacklevel=2) fixes the issue!

maybe i find the time making a pr, should be quick and easy. but i have one single container, that does not have that issue. exactly the one i cannot debug. So i am not sure whatup there

Liquidmasl commented 7 months ago

the one container where it works fine is running on python 3.10, rest on 3.11 i guess theres the issue

tintoy commented 7 months ago

Thanks, good find!

tintoy commented 7 months ago

(feel free to open a PR if you have time, otherwise I'll do it later this week 🙂)

tintoy commented 7 months ago

Ok; sorry for the delay, I've been away on vacation 🙂

Published v0.3.31!

tintoy commented 7 months ago

When you get a chance, could you try it out and let me know if it works for you?

Vacant0mens commented 2 months ago

@Liquidmasl Can you test out the new version with your setup?

Liquidmasl commented 2 months ago

@Liquidmasl Can you test out the new version with your setup?

hi, I use this in production since it was patched, works fine (: Thank you

sorry for not getting back!