Private logger property
See original GitHub issueIt would be nice if the logger property would be protected
instead of private
; that would allow its use in the init
function.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to use custom log4j.properties file for private logging?
I came up with a workaround where I'm using the regular logger: private static final Logger myLog = LoggerFactory.getLogger(MyClass ...
Read more >Logger in Java - Java Logging Example - DigitalOcean
LogManager is the class that reads the logging configuration, create and maintains the logger instances. We can use this class to set our...
Read more >Logger (Java Platform SE 7 ) - Oracle Help Center
A Logger object is used to log messages for a specific system or application component. Loggers are normally named, using a hierarchical dot-separated ......
Read more >Logger in Java | Java Logging Basics with Log4j and util
This article on Logger in Java is a comprehensive guide on the Java logging API used for logging solutions while creating projects.
Read more >Java Logging Basics - The Ultimate Guide To Logging - Loggly
This lets you create and store logging.properties files with individual projects. ... private static final Logger logger = Logger.
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 just published 1.3.3 which makes the logger protected.
I understand perfectly what you are saying, but I have an unwanted dependency that is not on my class; let me give you an example. I have in my
operator.ts
implementation of the Operator:In my
index.ts
file I have this:In my case, the logger is shared between other components (like a web component); I have only one definition for the logger. If the property would be
protected
, I wouldn’t need to export the logger from anywhere, and I wouldn’t need to override the constructor of my operator class. Also, if the attribute is already in the class, why not use it? Also, the default constructor works just fine; I don’t need to implement that either 😃Does it make sense?