structlog icon indicating copy to clipboard operation
structlog copied to clipboard

Adding ability to print full namespace of module for CallsiteParameterAdder

Open macintacos opened this issue 2 years ago • 6 comments

When using CallsiteParameter.MODULE in CallsiteParameterAdder, it's a bit too vague for my tastes - for example, a module named config has no meaning unless I know what package it's referring to. For example, I may have a module called foo.bar.config and another package could have a module called baz.buz.config, and it would not be possible to tell the difference with that value currently.

I know that there's CallsiteParameter.PATHNAME, but that's overly verbose - although I guess I could transform it to be something more palatable... At the end of the day though, it would be nice if there was a CallsiteParameter that would just print out foo.bar.config.

macintacos avatar Feb 15 '23 22:02 macintacos

Those values and behavior are based on stdlib logging – how do they handle it?

hynek avatar Mar 10 '23 07:03 hynek

Those values and behavior are based on stdlib logging – how do they handle it?

poorly.

zero tolerance for deviation or extension. I have a patch for this (new provider), but waiting for my last pull because I'm sometimes lazy and potentially forgot to branch.

pahrohfit avatar Oct 22 '23 07:10 pahrohfit

I couldn't find an easy/transportable way to add it as a CallsiteParameterAdder, but I was able to toss it into a small processor #568

pahrohfit avatar Oct 30 '23 20:10 pahrohfit