Open pyciko opened 5 months ago
Thanks for the pull request. However, since it hasn't even been decided yet whether such a feature will be added, let alone how it will be implemented, I can't really review this PR at this time and marked it as a draft for now. Sorry.
For big projects with many submodules, it is handy to mark the submodule that sent a log message. For example, if you have a realtime project with Teams, Users and Chats, and certain event parsing for some of these instances has failed, you'd probably want to print something like "[TEAMS] Failed fetching new avatar for team 2352379". That way, it's much easier to notice the desired messages. Basically I'm proposing to add a nullable "tag" field for Logger itself and individual log events (individual tags override Logger tag). This is not done on Printer level because Printer tags can't be individual for each log. I'm not sure about 2 things: