Sensible naming scheme for logging classes
See original GitHub issueSeeing as:
- The
LoggerCallback
-based classes (e.g.FileLogger
) have “Logger”, not “Callback” in their name. - Referring to the
LoggerCallback
s asLoggerCallbacks
feels ungainly and seems confusing, because it’s focusing on how they work instead of what they’re used for. - Most documentation and instructional material refers to
LoggerCallback
s as “Loggers”, which overloads the term. Trainer
has aloggers
hparam that takes a list ofLoggerCallback
s, notLoggers
s.- We renamed
LoggerBackend
toLoggerCallback
, but theLogger
class still usesbackend/backends
as a parameter and attribute name.
I propose that we come up with a more sensible naming scheme. I’m not super opinionated, but I have a few ideas. Perhaps we change Logger
to LogRouter
, LoggingController
, or LoggingFrontend
. Thoughts @hanlint, @ravi-mosaicml, @siriuslee
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Loggers - IBM
Loggers are named entities. Logger names are case-sensitive and they follow the hierarchical naming rule: a logger is said to be an ancestor...
Read more >10 JavaScript Naming Conventions Every Developer Should ...
This article lists the top 10 JavaScript naming conventions every JavaScript developer ... JavaScript variable names are case-sensitive.
Read more >10+ Java Logging Best Practices: Get the Most Out of Your Logs
Table of Contents. 1. Use a Standard Logging Library; 2. Select Your Appenders Wisely; 3. Use Meaningful Messages; 4. Logging Java Stack ...
Read more >JavaScript Naming Conventions - Robin Wieruch
Introduction to JavaScript Naming Conventions for differen data types and data structures in JS. Learn more about how to name private ...
Read more >What naming convention for C# file that contains multiple ...
My advice: avoid files containing multiple classes and name files==classes even if you mean there are too many files. Try to organize them...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m of the strong held opinion that we should not rename
Logger
. It’s really the main user-facing API. The fact that we have these different destinations is an implementation detail, and the naming should reflect that.If we accept that as a constraint, I’m not sure of any good options to handle this.
Discussed offline with @growlix; will rename
LoggerCallback
toLoggerDestination
.The rational was that
LoggerCallback
emphasizes the implementation (that it’s a callback) over what it actually does (that it’s where logging calls are sent).LoggerBackend
was also considered, but backend isn’t as clear as destination.