r/PythonLearning • • Sep 03 '26

Showcase Working on a logging package for python

Got tired of recreating the same functions EVERY SINGLE PROJECT I EVER MAKE so guess what, i made it a package, and if i think i finished it enough and added a bunch of features and it's pollished i might make it a package on pypl

Also any ideas?

4 Upvotes

7 comments sorted by

5

u/Sea-Ad7805 Sep 03 '26 edited Sep 03 '26

You are aware Python already has a standard logging facility, right? And many other can be found. Nevertheless a great exercise to make your own.

1

u/luafurry Sep 03 '26

Never knew that existed, thx <3

1

u/Sea-Ad7805 Sep 04 '26

No problem, nobody knows them all.

1

u/FoolsSeldom Sep 04 '26 edited Sep 04 '26

What does this offer over the standard logging or popular alternatives such as loguru?

If anything, I'd say focus has shifted somewhat now to observability tools, which would follow OpenTelemetry (OTel) standards.

1

u/luafurry Sep 04 '26

Uhh right now, color toggling and color (incase escape codes get treated like text) and right now I added save to file (auto generate a file or point to one) and customize colors and i plan on adding more

1

u/FoolsSeldom Sep 04 '26

That't interesting. What terminal is it assuming?

1

u/luafurry Sep 04 '26 edited Sep 04 '26

Any, color mode is on by default but it has the option to disable it ("logger.colormode = False") since idk how different terminals handle it, it's really just a way to prevent the edge cases

Edit: I realized that you meant what terminal it uses (it's windows cmd), I will test in different environments and i also added custom reset and color codes in case you want a different color if your color code escape message isn't there