question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sensible naming scheme for logging classes

See original GitHub issue

Seeing as:

  • The LoggerCallback-based classes (e.g. FileLogger) have “Logger”, not “Callback” in their name.
  • Referring to the LoggerCallbacks as LoggerCallbacks 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 LoggerCallbacks as “Loggers”, which overloads the term.
  • Trainer has a loggers hparam that takes a list of LoggerCallbacks, not Loggerss.
  • We renamed LoggerBackend to LoggerCallback, but the Logger class still uses backend/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:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hanlintcommented, Mar 3, 2022

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.

0reactions
ravi-mosaicmlcommented, Mar 9, 2022

Discussed offline with @growlix; will rename LoggerCallback to LoggerDestination.

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found