Cog-Creators / Cog-Creators/Red-DiscordBot
Util to generate Logger with consistent naming schema
- Dominant language
- Python
- Stars
- 5.7k
- Forks
- 2.5k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
### Type of feature request
Other
### Description of the feature you're suggesting
After a slightly detailed discussion in #coding on the main server, it came to the conclusion that unified namespaces for loggers of 3rd party cogs would be cool. It was proposed that a function could be added to the utils folder that takes the cog name and the repo name as its arguments, with an optional sub_module argument and returns the `Logger` object with a namespace as follows: `red.RepoName.CogName[.SubModule]`.
This new addition is useful in ways like having consistency in all logger names for all 3rd party cogs (that use this), core devs could force a certain namespace format, devs won't have to worry about their logs being silenced if they use the wrong namespace and this would strip the namespace to a specified char limit so that it doesn't look weird on consoles with extra large names.
### Anything else?
This would also merely be an addition and would not change or break any existing functionality in red.
I would like other's opinions on this and would be happy to PR this addition if agreed to.
Contributor guide
Assessment
This issue has not been assessed yet.