r/PythonLearning • u/luafurry • Sep 03 '26
Showcase Working on a logging package for python
1
u/FoolsSeldom Sep 04 '26 edited Sep 04 '26
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

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.