rm5248 commented on a change in pull request #90:
URL: https://github.com/apache/logging-log4cxx/pull/90#discussion_r777156489



##########
File path: src/main/include/log4cxx/logger.h
##########
@@ -617,13 +617,13 @@ class LOG4CXX_EXPORT Logger :
 
                @throws RuntimeException if all levels are null in the hierarchy
                */
-               virtual const LevelPtr getEffectiveLevel() const;
+               virtual const LevelPtr& getEffectiveLevel() const;
 
                /**
                Return the the LoggerRepository where this
                <code>Logger</code> is attached.
                */
-               log4cxx::spi::LoggerRepositoryWeakPtr getLoggerRepository() 
const;
+               log4cxx::spi::LoggerRepository* getLoggerRepository() const;

Review comment:
       Even if it doesn't completely fix it, there are at least two reasons 
that I can think of:
   * Since it is part of the public API, it forces clients to use smart 
pointers(better expressing the intent) and keeps it similar to other parts of 
the API
   * Keeps things stable for users who need to get the repository from the 
logger




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to