This is an automated email from the ASF dual-hosted git repository.
swebb2066 pushed a commit to branch next_stable
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
The following commit(s) were added to refs/heads/next_stable by this push:
new 02c28548 Prevent Clang warning messages (#151)
02c28548 is described below
commit 02c28548942bacb6442304021672fd9bfa3473f8
Author: Stephen Webb <[email protected]>
AuthorDate: Sun Nov 13 17:49:10 2022 +1100
Prevent Clang warning messages (#151)
---
src/examples/cpp/custom-appender.cpp | 10 ++++-----
src/main/cpp/nameabbreviator.cpp | 6 ++---
src/main/cpp/namepatternconverter.cpp | 2 +-
src/main/cpp/smtpappender.cpp | 2 +-
src/main/cpp/syslogappender.cpp | 2 ++
src/main/include/log4cxx/appenderskeleton.h | 20 ++++++++---------
src/main/include/log4cxx/asyncappender.h | 26 +++++++++++-----------
src/main/include/log4cxx/consoleappender.h | 4 ++--
src/main/include/log4cxx/db/odbcappender.h | 10 ++++-----
src/main/include/log4cxx/defaultloggerfactory.h | 4 +---
src/main/include/log4cxx/fileappender.h | 5 ++---
src/main/include/log4cxx/filter/andfilter.h | 4 ++--
src/main/include/log4cxx/filter/denyallfilter.h | 2 +-
src/main/include/log4cxx/filter/expressionfilter.h | 4 ++--
src/main/include/log4cxx/filter/levelmatchfilter.h | 5 ++---
src/main/include/log4cxx/filter/levelrangefilter.h | 5 ++---
.../include/log4cxx/filter/locationinfofilter.h | 4 ++--
.../include/log4cxx/filter/loggermatchfilter.h | 5 ++---
src/main/include/log4cxx/filter/mapfilter.h | 5 ++---
src/main/include/log4cxx/filter/propertyfilter.h | 2 +-
.../include/log4cxx/filter/stringmatchfilter.h | 5 ++---
.../log4cxx/helpers/appenderattachableimpl.h | 17 +++++++-------
src/main/include/log4cxx/helpers/bufferedwriter.h | 6 ++---
.../include/log4cxx/helpers/bytearrayinputstream.h | 4 ++--
.../log4cxx/helpers/bytearrayoutputstream.h | 6 ++---
src/main/include/log4cxx/helpers/fileinputstream.h | 4 ++--
.../include/log4cxx/helpers/fileoutputstream.h | 6 ++---
.../include/log4cxx/helpers/inputstreamreader.h | 4 ++--
src/main/include/log4cxx/helpers/object.h | 18 +++++++++------
.../include/log4cxx/helpers/onlyonceerrorhandler.h | 16 ++++++-------
.../include/log4cxx/helpers/outputstreamwriter.h | 6 ++---
.../log4cxx/helpers/propertyresourcebundle.h | 2 +-
.../include/log4cxx/helpers/socketoutputstream.h | 6 ++---
src/main/include/log4cxx/helpers/systemerrwriter.h | 6 ++---
src/main/include/log4cxx/helpers/systemoutwriter.h | 6 ++---
src/main/include/log4cxx/hierarchy.h | 4 ++--
src/main/include/log4cxx/htmllayout.h | 16 ++++++-------
src/main/include/log4cxx/jsonlayout.h | 12 +++++-----
src/main/include/log4cxx/logger.h | 17 +++++++-------
src/main/include/log4cxx/net/smtpappender.h | 10 ++++-----
.../include/log4cxx/net/socketappenderskeleton.h | 9 ++++----
src/main/include/log4cxx/net/sockethubappender.h | 10 ++++-----
src/main/include/log4cxx/net/syslogappender.h | 10 ++++-----
src/main/include/log4cxx/net/telnetappender.h | 10 ++++-----
src/main/include/log4cxx/net/xmlsocketappender.h | 10 ++++-----
src/main/include/log4cxx/nt/nteventlogappender.h | 10 ++++-----
.../include/log4cxx/nt/outputdebugstringappender.h | 6 ++---
.../log4cxx/pattern/classnamepatternconverter.h | 4 ++--
.../log4cxx/pattern/colorendpatternconverter.h | 4 ++--
.../log4cxx/pattern/colorstartpatternconverter.h | 4 ++--
.../include/log4cxx/pattern/datepatternconverter.h | 15 +++++++------
.../log4cxx/pattern/filelocationpatternconverter.h | 4 ++--
.../log4cxx/pattern/fulllocationpatternconverter.h | 4 ++--
.../log4cxx/pattern/integerpatternconverter.h | 4 ++--
.../log4cxx/pattern/levelpatternconverter.h | 6 ++---
.../log4cxx/pattern/linelocationpatternconverter.h | 4 ++--
.../pattern/lineseparatorpatternconverter.h | 8 +++----
.../log4cxx/pattern/literalpatternconverter.h | 8 +++----
.../log4cxx/pattern/loggerpatternconverter.h | 4 ++--
.../log4cxx/pattern/loggingeventpatternconverter.h | 8 +++----
.../log4cxx/pattern/messagepatternconverter.h | 4 ++--
.../pattern/methodlocationpatternconverter.h | 4 ++--
.../include/log4cxx/pattern/namepatternconverter.h | 2 +-
.../include/log4cxx/pattern/ndcpatternconverter.h | 4 ++--
.../include/log4cxx/pattern/patternconverter.h | 8 +++----
.../log4cxx/pattern/propertiespatternconverter.h | 4 ++--
.../log4cxx/pattern/relativetimepatternconverter.h | 4 ++--
.../pattern/shortfilelocationpatternconverter.h | 4 ++--
.../log4cxx/pattern/threadpatternconverter.h | 4 ++--
.../pattern/threadusernamepatternconverter.h | 4 ++--
.../pattern/throwableinformationpatternconverter.h | 6 ++---
src/main/include/log4cxx/patternlayout.h | 10 ++++-----
.../include/log4cxx/private/aprdatagramsocket.h | 12 +++++-----
src/main/include/log4cxx/private/aprserversocket.h | 4 ++--
src/main/include/log4cxx/propertyconfigurator.h | 2 +-
.../include/log4cxx/rolling/filerenameaction.h | 2 +-
.../log4cxx/rolling/filterbasedtriggeringpolicy.h | 14 ++++++------
.../log4cxx/rolling/fixedwindowrollingpolicy.h | 11 +++++----
.../include/log4cxx/rolling/gzcompressaction.h | 2 +-
.../log4cxx/rolling/manualtriggeringpolicy.h | 10 ++++-----
.../rolling/multiprocessrollingfileappender.h | 10 ++++-----
.../include/log4cxx/rolling/rollingfileappender.h | 8 +++----
.../include/log4cxx/rolling/rollingpolicybase.h | 5 ++---
.../log4cxx/rolling/sizebasedtriggeringpolicy.h | 10 ++++-----
.../log4cxx/rolling/timebasedrollingpolicy.h | 14 ++++++------
.../include/log4cxx/rolling/triggeringpolicy.h | 2 +-
.../include/log4cxx/rolling/zipcompressaction.h | 2 +-
src/main/include/log4cxx/simplelayout.h | 12 +++++-----
.../log4cxx/spi/defaultrepositoryselector.h | 2 +-
src/main/include/log4cxx/spi/filter.h | 7 +++---
src/main/include/log4cxx/spi/loggerfactory.h | 4 +---
src/main/include/log4cxx/spi/optionhandler.h | 2 +-
.../include/log4cxx/varia/fallbackerrorhandler.h | 16 ++++++-------
src/main/include/log4cxx/writerappender.h | 14 +++++-------
src/main/include/log4cxx/xml/domconfigurator.h | 2 +-
src/main/include/log4cxx/xml/xmllayout.h | 12 +++++-----
src/test/cpp/abts.cpp | 6 ++---
src/test/cpp/asyncappendertestcase.cpp | 8 +++----
src/test/cpp/benchmark/benchmark.cpp | 10 ++++-----
src/test/cpp/customlogger/xlogger.h | 4 ++--
src/test/cpp/loggertestcase.cpp | 6 ++---
src/test/cpp/net/smtpappendertestcase.cpp | 2 +-
src/test/cpp/pattern/num343patternconverter.h | 2 +-
src/test/cpp/throughput/log4cxxbenchmarker.cpp | 10 ++++-----
src/test/cpp/vectorappender.h | 6 ++---
105 files changed, 360 insertions(+), 371 deletions(-)
diff --git a/src/examples/cpp/custom-appender.cpp
b/src/examples/cpp/custom-appender.cpp
index 5154090d..51c485e8 100644
--- a/src/examples/cpp/custom-appender.cpp
+++ b/src/examples/cpp/custom-appender.cpp
@@ -34,21 +34,21 @@ public:
NullWriterAppender(){}
- virtual void close(){}
+ void close() override{}
- virtual bool requiresLayout() const {
+ bool requiresLayout() const override {
return false;
}
- virtual void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p){
+ void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool&
p) override {
// This gets called whenever there is a valid event for our
appender.
}
- virtual void activateOptions(log4cxx::helpers::Pool& /* pool */) {
+ void activateOptions(log4cxx::helpers::Pool& /* pool */) override {
// Given all of our options, do something useful(e.g. open a
file)
}
- virtual void setOption(const LogString& option, const LogString& value){
+ void setOption(const LogString& option, const LogString& value)
override {
if (helpers::StringHelper::equalsIgnoreCase(option,
LOG4CXX_STR("SOMEVALUE"), LOG4CXX_STR("somevalue"))){
// Do something with the 'value' here.
diff --git a/src/main/cpp/nameabbreviator.cpp b/src/main/cpp/nameabbreviator.cpp
index e2129767..6052a75f 100644
--- a/src/main/cpp/nameabbreviator.cpp
+++ b/src/main/cpp/nameabbreviator.cpp
@@ -61,7 +61,7 @@ class NOPAbbreviator : public NameAbbreviator
/**
* {@inheritDoc}
*/
- void abbreviate(LogString::size_type /* nameStart */,
LogString& /* buf */) const
+ void abbreviate(LogString::size_type /* nameStart */,
LogString& /* buf */) const override
{
}
};
@@ -96,7 +96,7 @@ class MaxElementAbbreviator : public NameAbbreviator
* @param buf buffer to append abbreviation.
* @param nameStart start of name to abbreviate.
*/
- void abbreviate(LogString::size_type nameStart, LogString& buf)
const
+ void abbreviate(LogString::size_type nameStart, LogString& buf)
const override
{
// We substract 1 from 'len' when assigning to 'end' to
avoid out of
// bounds exception in return r.substring(end+1, len).
This can happen if
@@ -230,7 +230,7 @@ class PatternAbbreviator : public NameAbbreviator
* @param buf buffer that abbreviated name is appended.
* @param nameStart start of name.
*/
- void abbreviate(LogString::size_type nameStart, LogString& buf)
const
+ void abbreviate(LogString::size_type nameStart, LogString& buf)
const override
{
//
// all non-terminal patterns are executed once
diff --git a/src/main/cpp/namepatternconverter.cpp
b/src/main/cpp/namepatternconverter.cpp
index 99f79bc2..ebc3d24d 100644
--- a/src/main/cpp/namepatternconverter.cpp
+++ b/src/main/cpp/namepatternconverter.cpp
@@ -70,7 +70,7 @@ NameAbbreviatorPtr NamePatternConverter::getAbbreviator(
* @param nameStart starting position of name to abbreviate.
* @param buf string buffer containing name.
*/
-void NamePatternConverter::abbreviate(int nameStart, LogString& buf) const
+void NamePatternConverter::abbreviate(LogString::size_type nameStart,
LogString& buf) const
{
priv->abbreviator->abbreviate(nameStart, buf);
}
diff --git a/src/main/cpp/smtpappender.cpp b/src/main/cpp/smtpappender.cpp
index 42cd6ed3..e8ffcb48 100644
--- a/src/main/cpp/smtpappender.cpp
+++ b/src/main/cpp/smtpappender.cpp
@@ -365,7 +365,7 @@ class LOG4CXX_EXPORT DefaultEvaluator :
has ERROR level or higher. Otherwise it returns
<code>false</code>.
*/
- virtual bool isTriggeringEvent(const spi::LoggingEventPtr&
event);
+ bool isTriggeringEvent(const spi::LoggingEventPtr& event)
override;
private:
DefaultEvaluator(const DefaultEvaluator&);
DefaultEvaluator& operator=(const DefaultEvaluator&);
diff --git a/src/main/cpp/syslogappender.cpp b/src/main/cpp/syslogappender.cpp
index 1de82236..0743514d 100644
--- a/src/main/cpp/syslogappender.cpp
+++ b/src/main/cpp/syslogappender.cpp
@@ -423,6 +423,7 @@ void SyslogAppender::setSyslogHost(const LogString&
syslogHost1)
if (syslogHost1 != LOG4CXX_STR("localhost") && syslogHost1 !=
LOG4CXX_STR("127.0.0.1")
&& !syslogHost1.empty())
#endif
+ {
if (slHostPort >= 0)
{
_priv->sw = std::make_unique<SyslogWriter>(slHost,
slHostPort);
@@ -431,6 +432,7 @@ void SyslogAppender::setSyslogHost(const LogString&
syslogHost1)
{
_priv->sw = std::make_unique<SyslogWriter>(slHost);
}
+ }
_priv->syslogHost = slHost;
_priv->syslogHostPort = slHostPort;
diff --git a/src/main/include/log4cxx/appenderskeleton.h
b/src/main/include/log4cxx/appenderskeleton.h
index c52110e8..b04c2c05 100644
--- a/src/main/include/log4cxx/appenderskeleton.h
+++ b/src/main/include/log4cxx/appenderskeleton.h
@@ -74,19 +74,19 @@ class LOG4CXX_EXPORT AppenderSkeleton :
Derived appenders should override this method if option
structure
requires it.
*/
- virtual void activateOptions(log4cxx::helpers::Pool& /* pool
*/) {}
- virtual void setOption(const LogString& option, const
LogString& value);
+ void activateOptions(helpers::Pool& /* pool */) override {}
+ void setOption(const LogString& option, const LogString& value)
override;
/**
Add a filter to end of the filter list.
*/
- void addFilter(const spi::FilterPtr newFilter) ;
+ void addFilter(const spi::FilterPtr newFilter) override;
public:
/**
Clear the filters chain.
*/
- void clearFilters();
+ void clearFilters() override;
/**
Return the currently set spi::ErrorHandler for this
@@ -97,7 +97,7 @@ class LOG4CXX_EXPORT AppenderSkeleton :
/**
Returns the head Filter.
*/
- spi::FilterPtr getFilter() const;
+ spi::FilterPtr getFilter() const override;
/**
Return the first filter in the filter chain for this
@@ -109,13 +109,13 @@ class LOG4CXX_EXPORT AppenderSkeleton :
/**
Returns the layout of this appender. The value may be nullptr.
*/
- LayoutPtr getLayout() const;
+ LayoutPtr getLayout() const override;
/**
Returns the name of this Appender.
*/
- LogString getName() const;
+ LogString getName() const override;
/**
Returns this appenders threshold level. See the #setThreshold
@@ -136,7 +136,7 @@ class LOG4CXX_EXPORT AppenderSkeleton :
* delegating actual logging to the subclasses specific
* AppenderSkeleton#append method.
* */
- virtual void doAppend(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& pool);
+ void doAppend(const spi::LoggingEventPtr& event, helpers::Pool&
pool) override;
/**
Set the {@link spi::ErrorHandler ErrorHandler} for this
Appender.
@@ -149,12 +149,12 @@ class LOG4CXX_EXPORT AppenderSkeleton :
{@link net::SocketAppender SocketAppender} ignores the layout
set
here.
*/
- void setLayout(const LayoutPtr layout1);
+ void setLayout(const LayoutPtr layout1) override;
/**
Set the name of this Appender.
*/
- void setName(const LogString& name1);
+ void setName(const LogString& name1) override;
/**
diff --git a/src/main/include/log4cxx/asyncappender.h
b/src/main/include/log4cxx/asyncappender.h
index 9f4339bf..c2404b84 100644
--- a/src/main/include/log4cxx/asyncappender.h
+++ b/src/main/include/log4cxx/asyncappender.h
@@ -83,25 +83,25 @@ class LOG4CXX_EXPORT AsyncAppender :
*
* @param newAppender appender to add, may not be null.
*/
- void addAppender(const AppenderPtr newAppender);
+ void addAppender(const AppenderPtr newAppender) override;
- virtual void doAppend(const spi::LoggingEventPtr& event,
- log4cxx::helpers::Pool& pool1);
+ void doAppend(const spi::LoggingEventPtr& event,
+ helpers::Pool& pool1) override;
- void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p);
+ void append(const spi::LoggingEventPtr& event, helpers::Pool&
p) override;
/**
Close this <code>AsyncAppender</code> by interrupting the
dispatcher thread which will process all pending events before
exiting.
*/
- void close();
+ void close() override;
/**
* Get iterator over attached appenders.
* @return list of all attached appenders.
*/
- AppenderList getAllAppenders() const;
+ AppenderList getAllAppenders() const override;
/**
* Get appender by name.
@@ -109,7 +109,7 @@ class LOG4CXX_EXPORT AsyncAppender :
* @param name name, may not be null.
* @return matching appender or null.
*/
- AppenderPtr getAppender(const LogString& name) const;
+ AppenderPtr getAppender(const LogString& name) const override;
/**
* Gets whether the location of the logging request call
@@ -123,25 +123,25 @@ class LOG4CXX_EXPORT AsyncAppender :
* @param appender appender.
* @return true if attached.
*/
- bool isAttached(const AppenderPtr appender) const;
+ bool isAttached(const AppenderPtr appender) const override;
- virtual bool requiresLayout() const;
+ bool requiresLayout() const override;
/**
* Removes and closes all attached appenders.
*/
- void removeAllAppenders();
+ void removeAllAppenders() override;
/**
* Removes an appender.
* @param appender appender to remove.
*/
- void removeAppender(const AppenderPtr appender);
+ void removeAppender(const AppenderPtr appender) override;
/**
* Remove appender by name.
* @param name name.
*/
- void removeAppender(const LogString& name);
+ void removeAppender(const LogString& name) override;
/**
* The <b>LocationInfo</b> attribute is provided for
compatibility
@@ -186,7 +186,7 @@ class LOG4CXX_EXPORT AsyncAppender :
* @param option property name.
* @param value property value.
*/
- void setOption(const LogString& option, const LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
private:
diff --git a/src/main/include/log4cxx/consoleappender.h
b/src/main/include/log4cxx/consoleappender.h
index 49d93823..aab1dc33 100644
--- a/src/main/include/log4cxx/consoleappender.h
+++ b/src/main/include/log4cxx/consoleappender.h
@@ -66,8 +66,8 @@ class LOG4CXX_EXPORT ConsoleAppender : public WriterAppender
* */
LogString getTarget() const;
- void activateOptions(log4cxx::helpers::Pool& p);
- void setOption(const LogString& option, const LogString& value);
+ void activateOptions(helpers::Pool& p) override;
+ void setOption(const LogString& option, const LogString& value)
override;
static const LogString& getSystemOut();
static const LogString& getSystemErr();
diff --git a/src/main/include/log4cxx/db/odbcappender.h
b/src/main/include/log4cxx/db/odbcappender.h
index aab2d454..b4104b97 100644
--- a/src/main/include/log4cxx/db/odbcappender.h
+++ b/src/main/include/log4cxx/db/odbcappender.h
@@ -116,17 +116,17 @@ class LOG4CXX_EXPORT ODBCAppender : public
AppenderSkeleton
/**
Set options
*/
- virtual void setOption(const LogString& option, const
LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
/**
Activate the specified options.
*/
- virtual void activateOptions(log4cxx::helpers::Pool& p);
+ void activateOptions(helpers::Pool& p) override;
/**
* Adds the event to the buffer. When full the buffer is
flushed.
*/
- void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool&);
+ void append(const spi::LoggingEventPtr& event, helpers::Pool&)
override;
/**
* By default getLogStatement sends the event to the required
Layout object.
@@ -173,7 +173,7 @@ class LOG4CXX_EXPORT ODBCAppender : public AppenderSkeleton
* connection if it is open.
*/
public:
- virtual void close();
+ void close() override;
/**
* loops through the buffer of LoggingEvents, gets a
@@ -187,7 +187,7 @@ class LOG4CXX_EXPORT ODBCAppender : public AppenderSkeleton
/**
* ODBCAppender requires a layout.
* */
- virtual bool requiresLayout() const
+ bool requiresLayout() const override
{
return true;
}
diff --git a/src/main/include/log4cxx/defaultloggerfactory.h
b/src/main/include/log4cxx/defaultloggerfactory.h
index 9bb7ac87..a5ce85a5 100644
--- a/src/main/include/log4cxx/defaultloggerfactory.h
+++ b/src/main/include/log4cxx/defaultloggerfactory.h
@@ -36,9 +36,7 @@ class LOG4CXX_EXPORT DefaultLoggerFactory :
LOG4CXX_CAST_ENTRY(spi::LoggerFactory)
END_LOG4CXX_CAST_MAP()
- virtual LoggerPtr makeNewLoggerInstance(
- log4cxx::helpers::Pool& pool,
- const LogString& name) const;
+ LoggerPtr makeNewLoggerInstance(helpers::Pool& pool, const
LogString& name) const override;
};
} // namespace log4cxx
diff --git a/src/main/include/log4cxx/fileappender.h
b/src/main/include/log4cxx/fileappender.h
index 51a58526..d2e199c0 100644
--- a/src/main/include/log4cxx/fileappender.h
+++ b/src/main/include/log4cxx/fileappender.h
@@ -117,9 +117,8 @@ class LOG4CXX_EXPORT FileAppender : public WriterAppender
<p>If there was already an opened file, then the previous file
is closed first.*/
- void activateOptions(log4cxx::helpers::Pool& p);
- void setOption(const LogString& option,
- const LogString& value);
+ void activateOptions(helpers::Pool& p) override;
+ void setOption(const LogString& option, const LogString& value)
override;
/**
Get the value of the <b>BufferedIO</b> option.
diff --git a/src/main/include/log4cxx/filter/andfilter.h
b/src/main/include/log4cxx/filter/andfilter.h
index 2e4033e8..2d4a30d9 100644
--- a/src/main/include/log4cxx/filter/andfilter.h
+++ b/src/main/include/log4cxx/filter/andfilter.h
@@ -93,11 +93,11 @@ class LOG4CXX_EXPORT AndFilter: public log4cxx::spi::Filter
AndFilter();
~AndFilter();
- void addFilter(const log4cxx::spi::FilterPtr& filter);
+ void addFilter(const spi::FilterPtr& filter);
void setAcceptOnMatch(bool acceptOnMatch);
- FilterDecision decide(const spi::LoggingEventPtr& event) const;
+ FilterDecision decide(const spi::LoggingEventPtr& event) const
override;
};
LOG4CXX_PTR_DEF(AndFilter);
diff --git a/src/main/include/log4cxx/filter/denyallfilter.h
b/src/main/include/log4cxx/filter/denyallfilter.h
index 9c0ee624..eb6746c0 100644
--- a/src/main/include/log4cxx/filter/denyallfilter.h
+++ b/src/main/include/log4cxx/filter/denyallfilter.h
@@ -58,7 +58,7 @@ class LOG4CXX_EXPORT DenyAllFilter : public spi::Filter
@param event The LoggingEvent to filter.
@return Always returns {@link spi::Filter#DENY DENY}.
*/
- FilterDecision decide(const spi::LoggingEventPtr& event) const
+ FilterDecision decide(const spi::LoggingEventPtr& event) const
override
{
return spi::Filter::DENY;
}
diff --git a/src/main/include/log4cxx/filter/expressionfilter.h
b/src/main/include/log4cxx/filter/expressionfilter.h
index 5b01b4a8..8eaf84e0 100644
--- a/src/main/include/log4cxx/filter/expressionfilter.h
+++ b/src/main/include/log4cxx/filter/expressionfilter.h
@@ -100,7 +100,7 @@ class LOG4CXX_EXPORT ExpressionFilter: public
log4cxx::spi::Filter
ExpressionFilter();
- void activateOptions(log4cxx::helpers::Pool& p);
+ void activateOptions(helpers::Pool& p) override;
void setExpression(const LogString& expression);
@@ -117,7 +117,7 @@ class LOG4CXX_EXPORT ExpressionFilter: public
log4cxx::spi::Filter
/**
Returns {@link log4cxx::spi::Filter#NEUTRAL} is there is no
string match.
*/
- FilterDecision decide(const spi::LoggingEventPtr& event) const;
+ FilterDecision decide(const spi::LoggingEventPtr& event) const
override;
};
}
}
diff --git a/src/main/include/log4cxx/filter/levelmatchfilter.h
b/src/main/include/log4cxx/filter/levelmatchfilter.h
index 56aa50fb..6240bc4f 100644
--- a/src/main/include/log4cxx/filter/levelmatchfilter.h
+++ b/src/main/include/log4cxx/filter/levelmatchfilter.h
@@ -65,8 +65,7 @@ class LOG4CXX_EXPORT LevelMatchFilter : public spi::Filter
/**
Set options
*/
- virtual void setOption(const LogString& option,
- const LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
void setLevelToMatch(const LogString& levelToMatch);
@@ -87,7 +86,7 @@ class LOG4CXX_EXPORT LevelMatchFilter : public spi::Filter
{@link spi::Filter#DENY DENY} if the
<b>AcceptOnMatch</b> property is set to false.
*/
- FilterDecision decide(const spi::LoggingEventPtr& event) const;
+ FilterDecision decide(const spi::LoggingEventPtr& event) const
override;
}; // class LevelMatchFilter
LOG4CXX_PTR_DEF(LevelMatchFilter);
} // namespace filter
diff --git a/src/main/include/log4cxx/filter/levelrangefilter.h
b/src/main/include/log4cxx/filter/levelrangefilter.h
index 9851e31c..8a69b983 100644
--- a/src/main/include/log4cxx/filter/levelrangefilter.h
+++ b/src/main/include/log4cxx/filter/levelrangefilter.h
@@ -73,8 +73,7 @@ class LOG4CXX_EXPORT LevelRangeFilter : public spi::Filter
/**
Set options
*/
- virtual void setOption(const LogString& option,
- const LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
/**
Set the <code>LevelMin</code> option.
@@ -117,7 +116,7 @@ class LOG4CXX_EXPORT LevelRangeFilter : public spi::Filter
returned decision is {@link spi::Filter#DENY DENY} if the
<b>AcceptOnMatch</b> property is set to false.
*/
- FilterDecision decide(const spi::LoggingEventPtr& event) const;
+ FilterDecision decide(const spi::LoggingEventPtr& event) const
override;
}; // class LevelRangeFilter
LOG4CXX_PTR_DEF(LevelRangeFilter);
} // namespace filter
diff --git a/src/main/include/log4cxx/filter/locationinfofilter.h
b/src/main/include/log4cxx/filter/locationinfofilter.h
index a2515da6..f4e2953e 100644
--- a/src/main/include/log4cxx/filter/locationinfofilter.h
+++ b/src/main/include/log4cxx/filter/locationinfofilter.h
@@ -60,7 +60,7 @@ class LOG4CXX_EXPORT LocationInfoFilter: public
log4cxx::spi::Filter
LocationInfoFilter();
- void activateOptions(log4cxx::helpers::Pool&);
+ void activateOptions(helpers::Pool&) override;
void setExpression(const LogString& expression);
@@ -79,7 +79,7 @@ class LOG4CXX_EXPORT LocationInfoFilter: public
log4cxx::spi::Filter
*
* Returns {@link log4cxx::spi::Filter#NEUTRAL}
*/
- FilterDecision decide(const spi::LoggingEventPtr& event) const;
+ FilterDecision decide(const spi::LoggingEventPtr& event) const
override;
};
}
diff --git a/src/main/include/log4cxx/filter/loggermatchfilter.h
b/src/main/include/log4cxx/filter/loggermatchfilter.h
index 494213c8..7b7c3c20 100644
--- a/src/main/include/log4cxx/filter/loggermatchfilter.h
+++ b/src/main/include/log4cxx/filter/loggermatchfilter.h
@@ -67,8 +67,7 @@ class LOG4CXX_EXPORT LoggerMatchFilter : public spi::Filter
/**
Set options
*/
- virtual void setOption(const LogString& option,
- const LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
void setLoggerToMatch(const LogString& levelToMatch);
@@ -89,7 +88,7 @@ class LOG4CXX_EXPORT LoggerMatchFilter : public spi::Filter
{@link spi::Filter#DENY DENY} if the
<b>AcceptOnMatch</b> property is set to false.
*/
- FilterDecision decide(const spi::LoggingEventPtr& event) const;
+ FilterDecision decide(const spi::LoggingEventPtr& event) const
override;
}; // class LoggerMatchFilter
LOG4CXX_PTR_DEF(LoggerMatchFilter);
} // namespace filter
diff --git a/src/main/include/log4cxx/filter/mapfilter.h
b/src/main/include/log4cxx/filter/mapfilter.h
index 67c49c5a..c6cf5c67 100644
--- a/src/main/include/log4cxx/filter/mapfilter.h
+++ b/src/main/include/log4cxx/filter/mapfilter.h
@@ -60,8 +60,7 @@ class LOG4CXX_EXPORT MapFilter: public log4cxx::spi::Filter
/**
Set options
*/
- virtual void setOption(const LogString& option,
- const LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
void setKeyValue(const LogString& strKey, const LogString&
strValue);
@@ -79,7 +78,7 @@ class LOG4CXX_EXPORT MapFilter: public log4cxx::spi::Filter
Returns {@link log4cxx::spi::Filter#NEUTRAL NEUTRAL}
is there is no string match.
*/
- FilterDecision decide(const spi::LoggingEventPtr& event) const;
+ FilterDecision decide(const spi::LoggingEventPtr& event) const
override;
}; // class MapFilter
LOG4CXX_PTR_DEF(MapFilter);
diff --git a/src/main/include/log4cxx/filter/propertyfilter.h
b/src/main/include/log4cxx/filter/propertyfilter.h
index 2f1f8cbd..a360021d 100644
--- a/src/main/include/log4cxx/filter/propertyfilter.h
+++ b/src/main/include/log4cxx/filter/propertyfilter.h
@@ -67,7 +67,7 @@ class LOG4CXX_EXPORT PropertyFilter : public
log4cxx::spi::Filter
~PropertyFilter();
void setProperties(const LogString& props);
- FilterDecision decide(const spi::LoggingEventPtr& event) const;
+ FilterDecision decide(const spi::LoggingEventPtr& event) const
override;
};
diff --git a/src/main/include/log4cxx/filter/stringmatchfilter.h
b/src/main/include/log4cxx/filter/stringmatchfilter.h
index 1091ea18..c4d5763a 100644
--- a/src/main/include/log4cxx/filter/stringmatchfilter.h
+++ b/src/main/include/log4cxx/filter/stringmatchfilter.h
@@ -69,8 +69,7 @@ class LOG4CXX_EXPORT StringMatchFilter : public spi::Filter
/**
Set options
*/
- virtual void setOption(const LogString& option,
- const LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
void setStringToMatch(const LogString& stringToMatch1);
@@ -84,7 +83,7 @@ class LOG4CXX_EXPORT StringMatchFilter : public spi::Filter
Returns {@link log4cxx::spi::Filter#NEUTRAL NEUTRAL}
is there is no string match.
*/
- FilterDecision decide(const spi::LoggingEventPtr& event) const;
+ FilterDecision decide(const spi::LoggingEventPtr& event) const
override;
}; // class StringMatchFilter
LOG4CXX_PTR_DEF(StringMatchFilter);
} // namespace filter
diff --git a/src/main/include/log4cxx/helpers/appenderattachableimpl.h
b/src/main/include/log4cxx/helpers/appenderattachableimpl.h
index 2317d3a9..40d50281 100644
--- a/src/main/include/log4cxx/helpers/appenderattachableimpl.h
+++ b/src/main/include/log4cxx/helpers/appenderattachableimpl.h
@@ -37,8 +37,7 @@ namespace helpers
{
class LOG4CXX_EXPORT AppenderAttachableImpl :
- public virtual spi::AppenderAttachable,
- public virtual helpers::Object
+ public virtual spi::AppenderAttachable
{
protected:
AppenderList& appenderList();
@@ -62,7 +61,7 @@ class LOG4CXX_EXPORT AppenderAttachableImpl :
/**
* Add an appender.
*/
- virtual void addAppender(const AppenderPtr newAppender);
+ void addAppender(const AppenderPtr newAppender) override;
/**
Call the <code>doAppend</code> method on all attached
appenders.
@@ -73,34 +72,34 @@ class LOG4CXX_EXPORT AppenderAttachableImpl :
/**
* Get all previously added appenders as an Enumeration.
*/
- virtual AppenderList getAllAppenders() const;
+ AppenderList getAllAppenders() const override;
/**
* Get an appender by name.
*/
- virtual AppenderPtr getAppender(const LogString& name) const;
+ AppenderPtr getAppender(const LogString& name) const override;
/**
Returns <code>true</code> if the specified appender is in the
list of attached appenders, <code>false</code> otherwise.
*/
- virtual bool isAttached(const AppenderPtr appender) const;
+ bool isAttached(const AppenderPtr appender) const override;
/**
* Remove all previously added appenders.
*/
- virtual void removeAllAppenders();
+ void removeAllAppenders() override;
/**
* Remove the appender passed as parameter from the list of
appenders.
*/
- virtual void removeAppender(const AppenderPtr appender);
+ void removeAppender(const AppenderPtr appender) override;
/**
* Remove the appender with the name passed as parameter from
the
* list of appenders.
*/
- virtual void removeAppender(const LogString& name);
+ void removeAppender(const LogString& name) override;
private:
LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(priv_data, m_priv)
diff --git a/src/main/include/log4cxx/helpers/bufferedwriter.h
b/src/main/include/log4cxx/helpers/bufferedwriter.h
index 49a01d35..5f165f6b 100644
--- a/src/main/include/log4cxx/helpers/bufferedwriter.h
+++ b/src/main/include/log4cxx/helpers/bufferedwriter.h
@@ -46,9 +46,9 @@ class LOG4CXX_EXPORT BufferedWriter : public Writer
BufferedWriter(WriterPtr& out, size_t sz);
virtual ~BufferedWriter();
- virtual void close(Pool& p);
- virtual void flush(Pool& p);
- virtual void write(const LogString& str, Pool& p);
+ void close(Pool& p) override;
+ void flush(Pool& p) override;
+ void write(const LogString& str, Pool& p) override;
private:
BufferedWriter(const BufferedWriter&);
diff --git a/src/main/include/log4cxx/helpers/bytearrayinputstream.h
b/src/main/include/log4cxx/helpers/bytearrayinputstream.h
index ecacecef..5b15f458 100644
--- a/src/main/include/log4cxx/helpers/bytearrayinputstream.h
+++ b/src/main/include/log4cxx/helpers/bytearrayinputstream.h
@@ -57,7 +57,7 @@ class LOG4CXX_EXPORT ByteArrayInputStream : public InputStream
* Closes this file input stream and releases any system
* resources associated with the stream.
*/
- virtual void close();
+ void close() override;
/**
* Reads a sequence of bytes into the given buffer.
@@ -66,7 +66,7 @@ class LOG4CXX_EXPORT ByteArrayInputStream : public InputStream
* @return the total number of bytes read into the buffer, or
-1 if there
* is no more data because the end of the stream has
been reached.
*/
- virtual int read(ByteBuffer& buf);
+ int read(ByteBuffer& buf) override;
private:
diff --git a/src/main/include/log4cxx/helpers/bytearrayoutputstream.h
b/src/main/include/log4cxx/helpers/bytearrayoutputstream.h
index 56f0c8bf..3d6089b9 100644
--- a/src/main/include/log4cxx/helpers/bytearrayoutputstream.h
+++ b/src/main/include/log4cxx/helpers/bytearrayoutputstream.h
@@ -48,9 +48,9 @@ class LOG4CXX_EXPORT ByteArrayOutputStream : public
OutputStream
ByteArrayOutputStream();
virtual ~ByteArrayOutputStream();
- virtual void close(Pool& p);
- virtual void flush(Pool& p);
- virtual void write(ByteBuffer& buf, Pool& p);
+ void close(Pool& p) override;
+ void flush(Pool& p) override;
+ void write(ByteBuffer& buf, Pool& p) override;
ByteList toByteArray() const;
private:
diff --git a/src/main/include/log4cxx/helpers/fileinputstream.h
b/src/main/include/log4cxx/helpers/fileinputstream.h
index ab907c85..754997b6 100644
--- a/src/main/include/log4cxx/helpers/fileinputstream.h
+++ b/src/main/include/log4cxx/helpers/fileinputstream.h
@@ -68,7 +68,7 @@ class LOG4CXX_EXPORT FileInputStream : public InputStream
* Closes this file input stream and releases any system
* resources associated with the stream.
*/
- virtual void close();
+ void close() override;
/**
* Reads a sequence of bytes into the given buffer.
@@ -77,7 +77,7 @@ class LOG4CXX_EXPORT FileInputStream : public InputStream
* @return the total number of bytes read into the buffer, or
-1 if there
* is no more data because the end of the stream has
been reached.
*/
- virtual int read(ByteBuffer& buf);
+ int read(ByteBuffer& buf) override;
private:
diff --git a/src/main/include/log4cxx/helpers/fileoutputstream.h
b/src/main/include/log4cxx/helpers/fileoutputstream.h
index baacb2ba..352e632b 100644
--- a/src/main/include/log4cxx/helpers/fileoutputstream.h
+++ b/src/main/include/log4cxx/helpers/fileoutputstream.h
@@ -48,9 +48,9 @@ class LOG4CXX_EXPORT FileOutputStream : public OutputStream
FileOutputStream(const logchar* filename, bool append = false);
virtual ~FileOutputStream();
- virtual void close(Pool& p);
- virtual void flush(Pool& p);
- virtual void write(ByteBuffer& buf, Pool& p);
+ void close(Pool& p) override;
+ void flush(Pool& p) override;
+ void write(ByteBuffer& buf, Pool& p) override;
apr_file_t* getFilePtr() const;
diff --git a/src/main/include/log4cxx/helpers/inputstreamreader.h
b/src/main/include/log4cxx/helpers/inputstreamreader.h
index bdd1d5d2..d3fd8581 100644
--- a/src/main/include/log4cxx/helpers/inputstreamreader.h
+++ b/src/main/include/log4cxx/helpers/inputstreamreader.h
@@ -72,13 +72,13 @@ class LOG4CXX_EXPORT InputStreamReader : public Reader
*
* @param p The memory pool associated with the reader.
*/
- virtual void close(Pool& p);
+ void close(Pool& p) override;
/**
* @return The complete stream contents as a LogString.
* @param p The memory pool associated with the reader.
*/
- virtual LogString read(Pool& p);
+ LogString read(Pool& p) override;
/**
* @return The name of the character encoding being used by
this stream.
diff --git a/src/main/include/log4cxx/helpers/object.h
b/src/main/include/log4cxx/helpers/object.h
index b8382a5c..6e0fe24f 100644
--- a/src/main/include/log4cxx/helpers/object.h
+++ b/src/main/include/log4cxx/helpers/object.h
@@ -23,7 +23,7 @@
#include <log4cxx/helpers/classregistration.h>
-#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)\
+#define DECLARE_LOG4CXX_CLAZZ_OBJECT(object)\
public:\
class Clazz##object : public helpers::Class\
{\
@@ -32,10 +32,13 @@
virtual ~Clazz##object() {}\
virtual log4cxx::LogString getName() const { return
LOG4CXX_STR(#object); } \
};\
- virtual const helpers::Class& getClass() const;\
static const helpers::Class& getStaticClass(); \
static const log4cxx::helpers::ClassRegistration& registerClass();
+#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)\
+ DECLARE_LOG4CXX_CLAZZ_OBJECT(object)\
+ const helpers::Class& getClass() const override;
+
#define DECLARE_LOG4CXX_OBJECT(object)\
public:\
class Clazz##object : public helpers::Class\
@@ -49,13 +52,13 @@
return new object();\
}\
};\
- virtual const helpers::Class& getClass() const;\
+ const helpers::Class& getClass() const override;\
static const helpers::Class& getStaticClass(); \
static const log4cxx::helpers::ClassRegistration& registerClass();
#define DECLARE_LOG4CXX_OBJECT_WITH_CUSTOM_CLASS(object, class)\
public:\
- virtual const helpers::Class& getClass() const;\
+ const helpers::Class& getClass() const override;\
static const helpers::Class& getStaticClass();\
static const log4cxx::helpers::ClassRegistration& registerClass();
@@ -101,10 +104,11 @@ class Pool;
class LOG4CXX_EXPORT Object
{
public:
- DECLARE_ABSTRACT_LOG4CXX_OBJECT(Object)
virtual ~Object() {}
+ virtual const helpers::Class& getClass() const = 0;
virtual bool instanceof(const Class& clazz) const = 0;
virtual const void* cast(const Class& clazz) const = 0;
+ DECLARE_LOG4CXX_CLAZZ_OBJECT(Object)
};
LOG4CXX_PTR_DEF(Object);
}
@@ -139,7 +143,7 @@ std::shared_ptr<Ret> cast(const std::shared_ptr<Type>&
incoming)
}
#define BEGIN_LOG4CXX_CAST_MAP()\
- const void * cast(const helpers::Class& clazz) const\
+ const void * cast(const helpers::Class& clazz) const override\
{\
const void * object = 0;\
if (&clazz == &helpers::Object::getStaticClass()) return (const
helpers::Object *)this;
@@ -147,7 +151,7 @@ std::shared_ptr<Ret> cast(const std::shared_ptr<Type>&
incoming)
#define END_LOG4CXX_CAST_MAP()\
return object;\
}\
- bool instanceof(const helpers::Class& clazz) const\
+ bool instanceof(const helpers::Class& clazz) const override\
{ return cast(clazz) != 0; }
#define LOG4CXX_CAST_ENTRY(Interface)\
diff --git a/src/main/include/log4cxx/helpers/onlyonceerrorhandler.h
b/src/main/include/log4cxx/helpers/onlyonceerrorhandler.h
index 0b48ec5b..0aa74b53 100644
--- a/src/main/include/log4cxx/helpers/onlyonceerrorhandler.h
+++ b/src/main/include/log4cxx/helpers/onlyonceerrorhandler.h
@@ -61,43 +61,43 @@ class LOG4CXX_EXPORT OnlyOnceErrorHandler :
/**
Does not do anything.
*/
- void setLogger(const LoggerPtr& logger);
+ void setLogger(const LoggerPtr& logger) override;
/**
No options to activate.
*/
- void activateOptions(log4cxx::helpers::Pool& p);
- void setOption(const LogString& option, const LogString& value);
+ void activateOptions(helpers::Pool& p) override;
+ void setOption(const LogString& option, const LogString& value)
override;
/**
Prints the message and the stack trace of the exception on
<code>System.err</code>. */
void error(const LogString& message, const std::exception& e,
- int errorCode) const;
+ int errorCode) const override;
/**
Prints the message and the stack trace of the exception on
<code>System.err</code>.
*/
void error(const LogString& message, const std::exception& e,
- int errorCode, const spi::LoggingEventPtr& event) const;
+ int errorCode, const spi::LoggingEventPtr& event) const
override;
/**
Print a the error message passed as parameter on
<code>System.err</code>.
*/
- void error(const LogString& message) const;
+ void error(const LogString& message) const override;
/**
Does not do anything.
*/
- void setAppender(const AppenderPtr& appender);
+ void setAppender(const AppenderPtr& appender) override;
/**
Does not do anything.
*/
- void setBackupAppender(const AppenderPtr& appender);
+ void setBackupAppender(const AppenderPtr& appender) override;
};
} // namespace helpers
} // namespace log4cxx
diff --git a/src/main/include/log4cxx/helpers/outputstreamwriter.h
b/src/main/include/log4cxx/helpers/outputstreamwriter.h
index 7f2a196b..fa6073a6 100644
--- a/src/main/include/log4cxx/helpers/outputstreamwriter.h
+++ b/src/main/include/log4cxx/helpers/outputstreamwriter.h
@@ -47,9 +47,9 @@ class LOG4CXX_EXPORT OutputStreamWriter : public Writer
OutputStreamWriter(OutputStreamPtr& out, CharsetEncoderPtr&
enc);
~OutputStreamWriter();
- virtual void close(Pool& p);
- virtual void flush(Pool& p);
- virtual void write(const LogString& str, Pool& p);
+ void close(Pool& p) override;
+ void flush(Pool& p) override;
+ void write(const LogString& str, Pool& p) override;
LogString getEncoding() const;
OutputStreamPtr getOutputStreamPtr() const;
diff --git a/src/main/include/log4cxx/helpers/propertyresourcebundle.h
b/src/main/include/log4cxx/helpers/propertyresourcebundle.h
index 1bba8c53..ce9920c7 100644
--- a/src/main/include/log4cxx/helpers/propertyresourcebundle.h
+++ b/src/main/include/log4cxx/helpers/propertyresourcebundle.h
@@ -49,7 +49,7 @@ class LOG4CXX_EXPORT PropertyResourceBundle : public
ResourceBundle
*/
PropertyResourceBundle(InputStreamPtr inStream);
- virtual LogString getString(const LogString& key) const;
+ LogString getString(const LogString& key) const override;
protected:
Properties properties;
diff --git a/src/main/include/log4cxx/helpers/socketoutputstream.h
b/src/main/include/log4cxx/helpers/socketoutputstream.h
index b2750869..fce751be 100644
--- a/src/main/include/log4cxx/helpers/socketoutputstream.h
+++ b/src/main/include/log4cxx/helpers/socketoutputstream.h
@@ -40,9 +40,9 @@ class LOG4CXX_EXPORT SocketOutputStream : public OutputStream
SocketOutputStream(const SocketPtr& socket);
~SocketOutputStream();
- virtual void close(Pool& p);
- virtual void flush(Pool& p);
- virtual void write(ByteBuffer& buf, Pool& p);
+ void close(Pool& p) override;
+ void flush(Pool& p) override;
+ void write(ByteBuffer& buf, Pool& p) override;
private:
LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(SocketOutputStreamPrivate,
m_priv)
diff --git a/src/main/include/log4cxx/helpers/systemerrwriter.h
b/src/main/include/log4cxx/helpers/systemerrwriter.h
index 6793b4fa..26304335 100644
--- a/src/main/include/log4cxx/helpers/systemerrwriter.h
+++ b/src/main/include/log4cxx/helpers/systemerrwriter.h
@@ -40,9 +40,9 @@ class LOG4CXX_EXPORT SystemErrWriter : public Writer
SystemErrWriter();
virtual ~SystemErrWriter();
- virtual void close(Pool& p);
- virtual void flush(Pool& p);
- virtual void write(const LogString& str, Pool& p);
+ void close(Pool& p) override;
+ void flush(Pool& p) override;
+ void write(const LogString& str, Pool& p) override;
static void write(const LogString& str);
static void flush();
diff --git a/src/main/include/log4cxx/helpers/systemoutwriter.h
b/src/main/include/log4cxx/helpers/systemoutwriter.h
index 642e039e..9b3d207e 100644
--- a/src/main/include/log4cxx/helpers/systemoutwriter.h
+++ b/src/main/include/log4cxx/helpers/systemoutwriter.h
@@ -40,9 +40,9 @@ class LOG4CXX_EXPORT SystemOutWriter : public Writer
SystemOutWriter();
~SystemOutWriter();
- virtual void close(Pool& p);
- virtual void flush(Pool& p);
- virtual void write(const LogString& str, Pool& p);
+ void close(Pool& p) override;
+ void flush(Pool& p) override;
+ void write(const LogString& str, Pool& p) override;
static void write(const LogString& str);
static void flush();
diff --git a/src/main/include/log4cxx/hierarchy.h
b/src/main/include/log4cxx/hierarchy.h
index e4d06fde..bb3a692d 100644
--- a/src/main/include/log4cxx/hierarchy.h
+++ b/src/main/include/log4cxx/hierarchy.h
@@ -100,7 +100,7 @@ class LOG4CXX_EXPORT Hierarchy : public
spi::LoggerRepository
@param name The name of the logger to search for.
*/
- LoggerPtr exists(const LogString& name);
+ LoggerPtr exists(const LogString& name) override;
/**
The string form of {@link #setThreshold(const LevelPtr&)
setThreshold}.
@@ -160,7 +160,7 @@ class LOG4CXX_EXPORT Hierarchy : public
spi::LoggerRepository
<p>The root logger is <em>not</em> included in the returned
LoggerList. */
- LoggerList getCurrentLoggers() const;
+ LoggerList getCurrentLoggers() const override;
/**
Get the root of this hierarchy.
diff --git a/src/main/include/log4cxx/htmllayout.h
b/src/main/include/log4cxx/htmllayout.h
index eb1e878b..4726fb4a 100644
--- a/src/main/include/log4cxx/htmllayout.h
+++ b/src/main/include/log4cxx/htmllayout.h
@@ -76,35 +76,35 @@ class LOG4CXX_EXPORT HTMLLayout : public Layout
/**
Returns the content type output by this layout, i.e "text/html".
*/
- virtual LogString getContentType() const;
+ LogString getContentType() const override;
/**
No options to activate.
*/
- virtual void activateOptions(log4cxx::helpers::Pool& /* p */) {}
+ void activateOptions(helpers::Pool& /* p */) override {}
/**
Set options
*/
- virtual void setOption(const LogString& option, const
LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
- virtual void format(LogString& output,
- const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& pool) const;
+ void format(LogString& output,
+ const spi::LoggingEventPtr& event, helpers::Pool& pool)
const override;
/**
Append appropriate HTML headers.
*/
- virtual void appendHeader(LogString& output,
log4cxx::helpers::Pool& pool);
+ void appendHeader(LogString& output, helpers::Pool& pool)
override;
/**
Append the appropriate HTML footers.
*/
- virtual void appendFooter(LogString& output,
log4cxx::helpers::Pool& pool);
+ void appendFooter(LogString& output, helpers::Pool& pool)
override;
/**
The HTML layout handles the throwable contained in logging
events. Hence, this method return <code>false</code>. */
- bool ignoresThrowable() const;
+ bool ignoresThrowable() const override;
}; // class HtmlLayout
LOG4CXX_PTR_DEF(HTMLLayout);
diff --git a/src/main/include/log4cxx/jsonlayout.h
b/src/main/include/log4cxx/jsonlayout.h
index 6314710b..016fe9d0 100644
--- a/src/main/include/log4cxx/jsonlayout.h
+++ b/src/main/include/log4cxx/jsonlayout.h
@@ -109,7 +109,7 @@ class LOG4CXX_EXPORT JSONLayout : public Layout
/**
Returns the content type output by this layout, i.e
"application/json".
*/
- virtual LogString getContentType() const
+ LogString getContentType() const override
{
return LOG4CXX_STR("application/json");
}
@@ -117,20 +117,20 @@ class LOG4CXX_EXPORT JSONLayout : public Layout
/**
No options to activate.
*/
- virtual void activateOptions(log4cxx::helpers::Pool& /* p */) {}
+ void activateOptions(helpers::Pool& /* p */) override {}
/**
Set options
*/
- virtual void setOption(const LogString& option, const
LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
- virtual void format(LogString& output,
- const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& pool) const;
+ void format(LogString& output,
+ const spi::LoggingEventPtr& event, helpers::Pool& pool)
const override;
/**
The JSON layout handles the throwable contained in logging
events. Hence, this method return <code>false</code>. */
- virtual bool ignoresThrowable() const
+ bool ignoresThrowable() const override
{
return false;
}
diff --git a/src/main/include/log4cxx/logger.h
b/src/main/include/log4cxx/logger.h
index d5b9c9a5..27eb93d1 100644
--- a/src/main/include/log4cxx/logger.h
+++ b/src/main/include/log4cxx/logger.h
@@ -47,8 +47,7 @@ This is the central class in the log4cxx package. Most logging
operations, except configuration, are done through this class.
*/
class LOG4CXX_EXPORT Logger :
- public virtual log4cxx::spi::AppenderAttachable,
- public virtual helpers::Object
+ public virtual log4cxx::spi::AppenderAttachable
{
public:
DECLARE_ABSTRACT_LOG4CXX_OBJECT(Logger)
@@ -83,7 +82,7 @@ class LOG4CXX_EXPORT Logger :
<p>If <code>newAppender</code> is already in the list of
appenders, then it won't be added again.
*/
- virtual void addAppender(const AppenderPtr newAppender);
+ void addAppender(const AppenderPtr newAppender) override;
/**
@@ -542,13 +541,13 @@ class LOG4CXX_EXPORT Logger :
If no appenders can be found, then an empty AppenderList
is returned.
@return AppenderList An collection of the appenders in this
logger.*/
- AppenderList getAllAppenders() const;
+ AppenderList getAllAppenders() const override;
/**
Look for the appender named as <code>name</code>.
<p>Return the appender with that name if in the list. Return
<code>NULL</code> otherwise. */
- AppenderPtr getAppender(const LogString& name) const;
+ AppenderPtr getAppender(const LogString& name) const override;
/**
Starting from this logger, search the logger hierarchy for a
@@ -876,7 +875,7 @@ class LOG4CXX_EXPORT Logger :
/**
Is the appender passed as parameter attached to this logger?
*/
- bool isAttached(const AppenderPtr appender) const;
+ bool isAttached(const AppenderPtr appender) const override;
/**
* Check whether this logger is enabled for the
<code>DEBUG</code>
@@ -1406,18 +1405,18 @@ class LOG4CXX_EXPORT Logger :
instance.
<p>This is useful when re-reading configuration information.
*/
- void removeAllAppenders();
+ void removeAllAppenders() override;
/**
Remove the appender passed as parameter form the list of
appenders.
*/
- void removeAppender(const AppenderPtr appender);
+ void removeAppender(const AppenderPtr appender) override;
/**
Remove the appender with the name passed as parameter form the
list of appenders.
*/
- void removeAppender(const LogString& name);
+ void removeAppender(const LogString& name) override;
/**
Set the additivity flag for this Logger instance.
diff --git a/src/main/include/log4cxx/net/smtpappender.h
b/src/main/include/log4cxx/net/smtpappender.h
index 0838f440..445bc8db 100644
--- a/src/main/include/log4cxx/net/smtpappender.h
+++ b/src/main/include/log4cxx/net/smtpappender.h
@@ -82,22 +82,22 @@ class LOG4CXX_EXPORT SMTPAppender : public AppenderSkeleton
/**
Set options
*/
- virtual void setOption(const LogString& option, const
LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
/**
Activate the specified options, such as the smtp host, the
recipient, from, etc.
*/
- virtual void activateOptions(log4cxx::helpers::Pool& p);
+ void activateOptions(helpers::Pool& p) override;
/**
Perform SMTPAppender specific appending actions, mainly adding
the event to a cyclic buffer and checking if the event triggers
an e-mail to be sent. */
- virtual void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p);
+ void append(const spi::LoggingEventPtr& event, helpers::Pool&
p) override;
- virtual void close();
+ void close() override;
/**
Returns value of the <b>To</b> option.
@@ -118,7 +118,7 @@ class LOG4CXX_EXPORT SMTPAppender : public AppenderSkeleton
/**
The <code>SMTPAppender</code> requires a {@link
Layout layout}. */
- virtual bool requiresLayout() const;
+ bool requiresLayout() const override;
/**
Send the contents of the cyclic buffer as an e-mail message.
diff --git a/src/main/include/log4cxx/net/socketappenderskeleton.h
b/src/main/include/log4cxx/net/socketappenderskeleton.h
index 48780196..9d511bc5 100644
--- a/src/main/include/log4cxx/net/socketappenderskeleton.h
+++ b/src/main/include/log4cxx/net/socketappenderskeleton.h
@@ -55,9 +55,9 @@ class LOG4CXX_EXPORT SocketAppenderSkeleton : public
AppenderSkeleton
/**
Connect to the specified <b>RemoteHost</b> and <b>Port</b>.
*/
- void activateOptions(log4cxx::helpers::Pool& p);
+ void activateOptions(helpers::Pool& p) override;
- void close();
+ void close() override;
/**
@@ -65,7 +65,7 @@ class LOG4CXX_EXPORT SocketAppenderSkeleton : public
AppenderSkeleton
* returns <code>false</code>.
*
*/
- bool requiresLayout() const
+ bool requiresLayout() const override
{
return false;
}
@@ -123,8 +123,7 @@ class LOG4CXX_EXPORT SocketAppenderSkeleton : public
AppenderSkeleton
void fireConnector();
- void setOption(const LogString& option,
- const LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
protected:
SocketAppenderSkeleton(std::unique_ptr<SocketAppenderSkeletonPriv> priv);
diff --git a/src/main/include/log4cxx/net/sockethubappender.h
b/src/main/include/log4cxx/net/sockethubappender.h
index 023eae7f..b79ab387 100644
--- a/src/main/include/log4cxx/net/sockethubappender.h
+++ b/src/main/include/log4cxx/net/sockethubappender.h
@@ -132,23 +132,23 @@ class LOG4CXX_EXPORT SocketHubAppender : public
AppenderSkeleton
/**
Set up the socket server on the specified port.
*/
- virtual void activateOptions(log4cxx::helpers::Pool& p);
+ void activateOptions(helpers::Pool& p) override;
/**
Set options
*/
- virtual void setOption(const LogString& option, const
LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
- virtual void close();
+ void close() override;
/**
Append an event to all of current connections. */
- virtual void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p);
+ void append(const spi::LoggingEventPtr& event, helpers::Pool&
p) override;
/**
The SocketHubAppender does not use a layout. Hence, this method
returns
<code>false</code>. */
- virtual bool requiresLayout() const
+ bool requiresLayout() const override
{
return false;
}
diff --git a/src/main/include/log4cxx/net/syslogappender.h
b/src/main/include/log4cxx/net/syslogappender.h
index e401fab5..1dff8309 100644
--- a/src/main/include/log4cxx/net/syslogappender.h
+++ b/src/main/include/log4cxx/net/syslogappender.h
@@ -60,7 +60,7 @@ class LOG4CXX_EXPORT SyslogAppender : public AppenderSkeleton
const LogString& syslogHost, int syslogFacility);
~SyslogAppender();
/** Release any resources held by this SyslogAppender.*/
- void close();
+ void close() override;
/**
Returns the specified syslog facility as a lower-case String,
@@ -78,20 +78,20 @@ class LOG4CXX_EXPORT SyslogAppender : public
AppenderSkeleton
*/
static int getFacility(const LogString& facilityName);
- void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p);
+ void append(const spi::LoggingEventPtr& event, helpers::Pool&
p) override;
/**
This method returns immediately as options are activated when
they
are set.
*/
- void activateOptions(log4cxx::helpers::Pool& p);
- void setOption(const LogString& option, const LogString& value);
+ void activateOptions(helpers::Pool& p) override;
+ void setOption(const LogString& option, const LogString& value)
override;
/**
The SyslogAppender requires a layout. Hence, this method returns
<code>true</code>.
*/
- virtual bool requiresLayout() const
+ bool requiresLayout() const override
{
return true;
}
diff --git a/src/main/include/log4cxx/net/telnetappender.h
b/src/main/include/log4cxx/net/telnetappender.h
index e996755c..c5e0812a 100644
--- a/src/main/include/log4cxx/net/telnetappender.h
+++ b/src/main/include/log4cxx/net/telnetappender.h
@@ -89,7 +89,7 @@ class LOG4CXX_EXPORT TelnetAppender : public AppenderSkeleton
/**
This appender requires a layout to format the text to the
attached client(s). */
- virtual bool requiresLayout() const
+ bool requiresLayout() const override
{
return true;
}
@@ -100,12 +100,12 @@ class LOG4CXX_EXPORT TelnetAppender : public
AppenderSkeleton
/** all of the options have been set, create the socket handler
and
wait for connections. */
- void activateOptions(log4cxx::helpers::Pool& p);
+ void activateOptions(helpers::Pool& p) override;
/**
Set options
*/
- virtual void setOption(const LogString& option, const
LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
/**
Returns value of the <b>Port</b> option.
@@ -120,12 +120,12 @@ class LOG4CXX_EXPORT TelnetAppender : public
AppenderSkeleton
/** shuts down the appender. */
- void close();
+ void close() override;
protected:
/** Handles a log event. For this appender, that means writing
the
message to each connected client. */
- virtual void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p) ;
+ void append(const spi::LoggingEventPtr& event, helpers::Pool&
p) override;
//----------------------------------------------------------
SocketHandler:
diff --git a/src/main/include/log4cxx/net/xmlsocketappender.h
b/src/main/include/log4cxx/net/xmlsocketappender.h
index dad19f72..7ca20bb6 100644
--- a/src/main/include/log4cxx/net/xmlsocketappender.h
+++ b/src/main/include/log4cxx/net/xmlsocketappender.h
@@ -124,15 +124,15 @@ class LOG4CXX_EXPORT XMLSocketAppender : public
SocketAppenderSkeleton
protected:
- virtual void setSocket(log4cxx::helpers::SocketPtr& socket,
log4cxx::helpers::Pool& p);
+ void setSocket(log4cxx::helpers::SocketPtr& socket,
helpers::Pool& p) override;
- virtual void cleanUp(log4cxx::helpers::Pool& p);
+ void cleanUp(helpers::Pool& p) override;
- virtual int getDefaultDelay() const;
+ int getDefaultDelay() const override;
- virtual int getDefaultPort() const;
+ int getDefaultPort() const override;
- void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& pool);
+ void append(const spi::LoggingEventPtr& event, helpers::Pool&
pool) override;
private:
// prevent copy and assignment statements
diff --git a/src/main/include/log4cxx/nt/nteventlogappender.h
b/src/main/include/log4cxx/nt/nteventlogappender.h
index 366cce65..ab9551c2 100644
--- a/src/main/include/log4cxx/nt/nteventlogappender.h
+++ b/src/main/include/log4cxx/nt/nteventlogappender.h
@@ -48,16 +48,16 @@ class LOG4CXX_EXPORT NTEventLogAppender : public
AppenderSkeleton
virtual ~NTEventLogAppender();
- virtual void activateOptions(log4cxx::helpers::Pool& p);
- virtual void close();
- virtual void setOption(const LogString& option, const
LogString& value);
+ void activateOptions(helpers::Pool& p) override;
+ void close() override;
+ void setOption(const LogString& option, const LogString& value)
override;
/**
* The SocketAppender does not use a layout. Hence, this method
* returns <code>false</code>.
*
*/
- bool requiresLayout() const
+ bool requiresLayout() const override
{
return true;
}
@@ -83,7 +83,7 @@ class LOG4CXX_EXPORT NTEventLogAppender : public
AppenderSkeleton
typedef void SID;
typedef void* HANDLE;
- virtual void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p);
+ void append(const spi::LoggingEventPtr& event, helpers::Pool&
p) override;
static unsigned short getEventType(const spi::LoggingEventPtr&
event);
static unsigned short getEventCategory(const
spi::LoggingEventPtr& event);
/*
diff --git a/src/main/include/log4cxx/nt/outputdebugstringappender.h
b/src/main/include/log4cxx/nt/outputdebugstringappender.h
index 47aacced..3c30999b 100644
--- a/src/main/include/log4cxx/nt/outputdebugstringappender.h
+++ b/src/main/include/log4cxx/nt/outputdebugstringappender.h
@@ -35,14 +35,14 @@ class LOG4CXX_EXPORT OutputDebugStringAppender : public
AppenderSkeleton
OutputDebugStringAppender();
- bool requiresLayout() const
+ bool requiresLayout() const override
{
return true;
}
- virtual void close() {}
+ void close() override {}
- virtual void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p);
+ void append(const spi::LoggingEventPtr& event, helpers::Pool&
p) override;
};
}
}
diff --git a/src/main/include/log4cxx/pattern/classnamepatternconverter.h
b/src/main/include/log4cxx/pattern/classnamepatternconverter.h
index 66ce9f91..067dee6a 100644
--- a/src/main/include/log4cxx/pattern/classnamepatternconverter.h
+++ b/src/main/include/log4cxx/pattern/classnamepatternconverter.h
@@ -58,9 +58,9 @@ class LOG4CXX_EXPORT ClassNamePatternConverter : public
NamePatternConverter
using NamePatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
}
diff --git a/src/main/include/log4cxx/pattern/colorendpatternconverter.h
b/src/main/include/log4cxx/pattern/colorendpatternconverter.h
index fbdae3cb..4d2aefa5 100644
--- a/src/main/include/log4cxx/pattern/colorendpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/colorendpatternconverter.h
@@ -54,9 +54,9 @@ class LOG4CXX_EXPORT ColorEndPatternConverter
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
}
diff --git a/src/main/include/log4cxx/pattern/colorstartpatternconverter.h
b/src/main/include/log4cxx/pattern/colorstartpatternconverter.h
index fc45befd..3ce700ab 100644
--- a/src/main/include/log4cxx/pattern/colorstartpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/colorstartpatternconverter.h
@@ -55,9 +55,9 @@ class LOG4CXX_EXPORT ColorStartPatternConverter
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
}
diff --git a/src/main/include/log4cxx/pattern/datepatternconverter.h
b/src/main/include/log4cxx/pattern/datepatternconverter.h
index 229c8db6..66ea38ac 100644
--- a/src/main/include/log4cxx/pattern/datepatternconverter.h
+++ b/src/main/include/log4cxx/pattern/datepatternconverter.h
@@ -44,7 +44,7 @@ class LOG4CXX_EXPORT DatePatternConverter : public
LoggingEventPatternConverter
* @param options options, may be null.
* @return instance of pattern converter.
*/
- static log4cxx::helpers::DateFormatPtr getDateFormat(const
OptionsList& options);
+ static helpers::DateFormatPtr getDateFormat(const OptionsList&
options);
public:
DECLARE_LOG4CXX_PATTERN(DatePatternConverter)
BEGIN_LOG4CXX_CAST_MAP()
@@ -63,16 +63,17 @@ class LOG4CXX_EXPORT DatePatternConverter : public
LoggingEventPatternConverter
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& output,
- log4cxx::helpers::Pool& p) const;
- void format(const log4cxx::helpers::ObjectPtr& obj,
+ helpers::Pool& p) const override;
+
+ void format(const helpers::ObjectPtr& obj,
LogString& output,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
- void format(const log4cxx::helpers::DatePtr& date,
+ void format(const helpers::DatePtr& date,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const;
};
LOG4CXX_PTR_DEF(DatePatternConverter);
diff --git a/src/main/include/log4cxx/pattern/filelocationpatternconverter.h
b/src/main/include/log4cxx/pattern/filelocationpatternconverter.h
index d94d61eb..a7c5c184 100644
--- a/src/main/include/log4cxx/pattern/filelocationpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/filelocationpatternconverter.h
@@ -54,9 +54,9 @@ class LOG4CXX_EXPORT FileLocationPatternConverter
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
}
diff --git a/src/main/include/log4cxx/pattern/fulllocationpatternconverter.h
b/src/main/include/log4cxx/pattern/fulllocationpatternconverter.h
index d5b6cae5..6620c8a5 100644
--- a/src/main/include/log4cxx/pattern/fulllocationpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/fulllocationpatternconverter.h
@@ -54,9 +54,9 @@ class LOG4CXX_EXPORT FullLocationPatternConverter
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
}
diff --git a/src/main/include/log4cxx/pattern/integerpatternconverter.h
b/src/main/include/log4cxx/pattern/integerpatternconverter.h
index 961148d3..b407b275 100644
--- a/src/main/include/log4cxx/pattern/integerpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/integerpatternconverter.h
@@ -51,9 +51,9 @@ class LOG4CXX_EXPORT IntegerPatternConverter : public
PatternConverter
static PatternConverterPtr newInstance(
const std::vector<LogString>& options);
- void format(const log4cxx::helpers::ObjectPtr& obj,
+ void format(const helpers::ObjectPtr& obj,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
LOG4CXX_PTR_DEF(IntegerPatternConverter);
diff --git a/src/main/include/log4cxx/pattern/levelpatternconverter.h
b/src/main/include/log4cxx/pattern/levelpatternconverter.h
index 3ae0c7b0..df019f69 100644
--- a/src/main/include/log4cxx/pattern/levelpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/levelpatternconverter.h
@@ -53,11 +53,11 @@ class LOG4CXX_EXPORT LevelPatternConverter : public
LoggingEventPatternConverter
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
- LogString getStyleClass(const log4cxx::helpers::ObjectPtr& e)
const;
+ LogString getStyleClass(const helpers::ObjectPtr& e) const
override;
};
}
}
diff --git a/src/main/include/log4cxx/pattern/linelocationpatternconverter.h
b/src/main/include/log4cxx/pattern/linelocationpatternconverter.h
index 5656c486..2a1444fb 100644
--- a/src/main/include/log4cxx/pattern/linelocationpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/linelocationpatternconverter.h
@@ -54,9 +54,9 @@ class LOG4CXX_EXPORT LineLocationPatternConverter
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
}
diff --git a/src/main/include/log4cxx/pattern/lineseparatorpatternconverter.h
b/src/main/include/log4cxx/pattern/lineseparatorpatternconverter.h
index 592f708d..048e534c 100644
--- a/src/main/include/log4cxx/pattern/lineseparatorpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/lineseparatorpatternconverter.h
@@ -54,13 +54,13 @@ class LOG4CXX_EXPORT LineSeparatorPatternConverter
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
- void format(const log4cxx::helpers::ObjectPtr& obj,
+ void format(const helpers::ObjectPtr& obj,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
}
diff --git a/src/main/include/log4cxx/pattern/literalpatternconverter.h
b/src/main/include/log4cxx/pattern/literalpatternconverter.h
index d07a8c65..b582bdbd 100644
--- a/src/main/include/log4cxx/pattern/literalpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/literalpatternconverter.h
@@ -54,13 +54,13 @@ class LOG4CXX_EXPORT LiteralPatternConverter : public
LoggingEventPatternConvert
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
- void format(const log4cxx::helpers::ObjectPtr& obj,
+ void format(const helpers::ObjectPtr& obj,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
}
diff --git a/src/main/include/log4cxx/pattern/loggerpatternconverter.h
b/src/main/include/log4cxx/pattern/loggerpatternconverter.h
index 4ff2f1a6..f25add70 100644
--- a/src/main/include/log4cxx/pattern/loggerpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/loggerpatternconverter.h
@@ -54,9 +54,9 @@ class LOG4CXX_EXPORT LoggerPatternConverter : public
NamePatternConverter
using NamePatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
}
diff --git a/src/main/include/log4cxx/pattern/loggingeventpatternconverter.h
b/src/main/include/log4cxx/pattern/loggingeventpatternconverter.h
index 667c78d7..c7616950 100644
--- a/src/main/include/log4cxx/pattern/loggingeventpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/loggingeventpatternconverter.h
@@ -61,13 +61,13 @@ class LOG4CXX_EXPORT LoggingEventPatternConverter : public
PatternConverter
* @param p pool for memory allocations needing during format.
*/
virtual void format(
- const log4cxx::spi::LoggingEventPtr& event,
+ const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const = 0;
+ helpers::Pool& p) const = 0;
- void format(const log4cxx::helpers::ObjectPtr& obj,
+ void format(const helpers::ObjectPtr& obj,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
/**
* Normally pattern converters are not meant to handle
Exceptions although
diff --git a/src/main/include/log4cxx/pattern/messagepatternconverter.h
b/src/main/include/log4cxx/pattern/messagepatternconverter.h
index 5522cc9c..0ff46b23 100644
--- a/src/main/include/log4cxx/pattern/messagepatternconverter.h
+++ b/src/main/include/log4cxx/pattern/messagepatternconverter.h
@@ -53,9 +53,9 @@ class LOG4CXX_EXPORT MessagePatternConverter : public
LoggingEventPatternConvert
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
}
}
diff --git a/src/main/include/log4cxx/pattern/methodlocationpatternconverter.h
b/src/main/include/log4cxx/pattern/methodlocationpatternconverter.h
index f0442b3b..1a5d5ce9 100644
--- a/src/main/include/log4cxx/pattern/methodlocationpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/methodlocationpatternconverter.h
@@ -54,9 +54,9 @@ class LOG4CXX_EXPORT MethodLocationPatternConverter
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
}
}
diff --git a/src/main/include/log4cxx/pattern/namepatternconverter.h
b/src/main/include/log4cxx/pattern/namepatternconverter.h
index 436a5e2c..f133f192 100644
--- a/src/main/include/log4cxx/pattern/namepatternconverter.h
+++ b/src/main/include/log4cxx/pattern/namepatternconverter.h
@@ -62,7 +62,7 @@ class LOG4CXX_EXPORT NamePatternConverter : public
LoggingEventPatternConverter
* @param nameStart starting position of name to abbreviate.
* @param buf string buffer containing name.
*/
- void abbreviate(int nameStart, LogString& buf) const;
+ void abbreviate(LogString::size_type nameStart, LogString& buf)
const;
private:
NameAbbreviatorPtr getAbbreviator(const std::vector<LogString>&
options);
diff --git a/src/main/include/log4cxx/pattern/ndcpatternconverter.h
b/src/main/include/log4cxx/pattern/ndcpatternconverter.h
index 6713d5c7..dd89f194 100644
--- a/src/main/include/log4cxx/pattern/ndcpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/ndcpatternconverter.h
@@ -53,9 +53,9 @@ class LOG4CXX_EXPORT NDCPatternConverter : public
LoggingEventPatternConverter
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
}
}
diff --git a/src/main/include/log4cxx/pattern/patternconverter.h
b/src/main/include/log4cxx/pattern/patternconverter.h
index 05916f45..9d63a37a 100644
--- a/src/main/include/log4cxx/pattern/patternconverter.h
+++ b/src/main/include/log4cxx/pattern/patternconverter.h
@@ -42,7 +42,7 @@ typedef std::vector<LogString> OptionsList;
converting an object in a converter specific manner.
*/
-class LOG4CXX_EXPORT PatternConverter : public virtual log4cxx::helpers::Object
+class LOG4CXX_EXPORT PatternConverter : public virtual helpers::Object
{
protected:
LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(PatternConverterPrivate,
m_priv)
@@ -71,9 +71,9 @@ class LOG4CXX_EXPORT PatternConverter : public virtual
log4cxx::helpers::Object
* @param toAppendTo string buffer to which the formatted event
will be appended. May not be null.
* @param p pool for any allocations necessary during
formatting.
*/
- virtual void format(const log4cxx::helpers::ObjectPtr& obj,
+ virtual void format(const helpers::ObjectPtr& obj,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const = 0;
+ helpers::Pool& p) const = 0;
/**
* This method returns the name of the conversion pattern.
@@ -93,7 +93,7 @@ class LOG4CXX_EXPORT PatternConverter : public virtual
log4cxx::helpers::Object
* @param e null values are accepted
* @return the name of the conversion pattern
*/
- virtual LogString getStyleClass(const
log4cxx::helpers::ObjectPtr& e) const;
+ virtual LogString getStyleClass(const helpers::ObjectPtr& e)
const;
protected:
/**
diff --git a/src/main/include/log4cxx/pattern/propertiespatternconverter.h
b/src/main/include/log4cxx/pattern/propertiespatternconverter.h
index cc156897..f3aea02c 100644
--- a/src/main/include/log4cxx/pattern/propertiespatternconverter.h
+++ b/src/main/include/log4cxx/pattern/propertiespatternconverter.h
@@ -64,9 +64,9 @@ class LOG4CXX_EXPORT PropertiesPatternConverter
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ log4cxx::helpers::Pool& p) const override;
};
}
}
diff --git a/src/main/include/log4cxx/pattern/relativetimepatternconverter.h
b/src/main/include/log4cxx/pattern/relativetimepatternconverter.h
index 2e02bc72..2e66c9a8 100644
--- a/src/main/include/log4cxx/pattern/relativetimepatternconverter.h
+++ b/src/main/include/log4cxx/pattern/relativetimepatternconverter.h
@@ -57,9 +57,9 @@ class LOG4CXX_EXPORT RelativeTimePatternConverter : public
LoggingEventPatternCo
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ log4cxx::helpers::Pool& p) const override;
};
}
}
diff --git
a/src/main/include/log4cxx/pattern/shortfilelocationpatternconverter.h
b/src/main/include/log4cxx/pattern/shortfilelocationpatternconverter.h
index db17d0bf..329c0923 100644
--- a/src/main/include/log4cxx/pattern/shortfilelocationpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/shortfilelocationpatternconverter.h
@@ -57,9 +57,9 @@ class LOG4CXX_EXPORT ShortFileLocationPatternConverter
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
}
diff --git a/src/main/include/log4cxx/pattern/threadpatternconverter.h
b/src/main/include/log4cxx/pattern/threadpatternconverter.h
index fe362f02..fee917f8 100644
--- a/src/main/include/log4cxx/pattern/threadpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/threadpatternconverter.h
@@ -53,9 +53,9 @@ class LOG4CXX_EXPORT ThreadPatternConverter : public
LoggingEventPatternConverte
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
};
}
}
diff --git a/src/main/include/log4cxx/pattern/threadusernamepatternconverter.h
b/src/main/include/log4cxx/pattern/threadusernamepatternconverter.h
index b8e2c130..1751428b 100644
--- a/src/main/include/log4cxx/pattern/threadusernamepatternconverter.h
+++ b/src/main/include/log4cxx/pattern/threadusernamepatternconverter.h
@@ -42,9 +42,9 @@ class LOG4CXX_EXPORT ThreadUsernamePatternConverter : public
LoggingEventPattern
static PatternConverterPtr newInstance(
const std::vector<LogString>& options);
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ log4cxx::helpers::Pool& p) const override;
};
}
diff --git
a/src/main/include/log4cxx/pattern/throwableinformationpatternconverter.h
b/src/main/include/log4cxx/pattern/throwableinformationpatternconverter.h
index 83c19404..72b6d432 100644
--- a/src/main/include/log4cxx/pattern/throwableinformationpatternconverter.h
+++ b/src/main/include/log4cxx/pattern/throwableinformationpatternconverter.h
@@ -59,15 +59,15 @@ class LOG4CXX_EXPORT ThrowableInformationPatternConverter
using LoggingEventPatternConverter::format;
- void format(const log4cxx::spi::LoggingEventPtr& event,
+ void format(const spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
/**
* This converter obviously handles throwables.
* @return true.
*/
- bool handlesThrowable() const;
+ bool handlesThrowable() const override;
};
}
}
diff --git a/src/main/include/log4cxx/patternlayout.h
b/src/main/include/log4cxx/patternlayout.h
index fb055e69..f7b844d8 100644
--- a/src/main/include/log4cxx/patternlayout.h
+++ b/src/main/include/log4cxx/patternlayout.h
@@ -393,16 +393,16 @@ class LOG4CXX_EXPORT PatternLayout : public Layout
/**
* Call createPatternParser
*/
- virtual void activateOptions(log4cxx::helpers::Pool& p);
+ void activateOptions(helpers::Pool& p) override;
- virtual void setOption(const LogString& option, const
LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
/**
* The PatternLayout does not handle the throwable contained
within
* {@link spi::LoggingEvent LoggingEvents}. Thus, it returns
* <code>true</code>.
*/
- virtual bool ignoresThrowable() const
+ bool ignoresThrowable() const override
{
return true;
}
@@ -410,9 +410,9 @@ class LOG4CXX_EXPORT PatternLayout : public Layout
/**
* Produces a formatted string as specified by the conversion
pattern.
*/
- virtual void format( LogString& output,
+ void format( LogString& output,
const spi::LoggingEventPtr& event,
- log4cxx::helpers::Pool& pool) const;
+ helpers::Pool& pool) const override;
protected:
virtual log4cxx::pattern::PatternMap getFormatSpecifiers();
diff --git a/src/main/include/log4cxx/private/aprdatagramsocket.h
b/src/main/include/log4cxx/private/aprdatagramsocket.h
index 0f75cd0a..0aa567e2 100644
--- a/src/main/include/log4cxx/private/aprdatagramsocket.h
+++ b/src/main/include/log4cxx/private/aprdatagramsocket.h
@@ -35,19 +35,19 @@ class APRDatagramSocket : public DatagramSocket {
APRDatagramSocket(int port, InetAddressPtr laddr);
- virtual void bind(int lport, InetAddressPtr laddress);
+ void bind(int lport, InetAddressPtr laddress) override;
- virtual void close();
+ void close() override;
- virtual bool isClosed() const;
+ bool isClosed() const override;
/** Receives a datagram packet from this socket. */
- virtual void receive(DatagramPacketPtr& p);
+ virtual void receive(DatagramPacketPtr& p) override;
/** Sends a datagram packet from this socket. */
- virtual void send(DatagramPacketPtr& p);
+ virtual void send(DatagramPacketPtr& p) override;
- virtual void connect(InetAddressPtr address, int port);
+ virtual void connect(InetAddressPtr address, int port) override;
private:
void init();
diff --git a/src/main/include/log4cxx/private/aprserversocket.h
b/src/main/include/log4cxx/private/aprserversocket.h
index b05aba91..1967cbd3 100644
--- a/src/main/include/log4cxx/private/aprserversocket.h
+++ b/src/main/include/log4cxx/private/aprserversocket.h
@@ -33,9 +33,9 @@ class LOG4CXX_EXPORT APRServerSocket : public
helpers::ServerSocket
public:
APRServerSocket(int port);
- void close();
+ void close() override;
- SocketPtr accept();
+ SocketPtr accept() override;
private:
struct APRServerSocketPriv;
diff --git a/src/main/include/log4cxx/propertyconfigurator.h
b/src/main/include/log4cxx/propertyconfigurator.h
index 9eeda979..4cdfc3db 100644
--- a/src/main/include/log4cxx/propertyconfigurator.h
+++ b/src/main/include/log4cxx/propertyconfigurator.h
@@ -290,7 +290,7 @@ class LOG4CXX_EXPORT PropertyConfigurator :
@param hierarchy The hierarchy to operation upon.
*/
void doConfigure(const File& configFileName,
- spi::LoggerRepositoryPtr hierarchy);
+ spi::LoggerRepositoryPtr hierarchy) override;
/**
Read configuration options from file
<code>configFilename</code>.
diff --git a/src/main/include/log4cxx/rolling/filerenameaction.h
b/src/main/include/log4cxx/rolling/filerenameaction.h
index b572bd03..ba33faaa 100644
--- a/src/main/include/log4cxx/rolling/filerenameaction.h
+++ b/src/main/include/log4cxx/rolling/filerenameaction.h
@@ -49,7 +49,7 @@ class FileRenameAction : public Action
*
* @return true if successful.
*/
- virtual bool execute(log4cxx::helpers::Pool& pool) const;
+ bool execute(log4cxx::helpers::Pool& pool) const override;
};
LOG4CXX_PTR_DEF(FileRenameAction);
diff --git a/src/main/include/log4cxx/rolling/filterbasedtriggeringpolicy.h
b/src/main/include/log4cxx/rolling/filterbasedtriggeringpolicy.h
index 3cb6a427..97f30b3e 100644
--- a/src/main/include/log4cxx/rolling/filterbasedtriggeringpolicy.h
+++ b/src/main/include/log4cxx/rolling/filterbasedtriggeringpolicy.h
@@ -84,17 +84,17 @@ class LOG4CXX_EXPORT FilterBasedTriggeringPolicy : public
TriggeringPolicy
* @param fileLength Length of the file in bytes.
* @return true if a rollover should occur.
*/
- virtual bool isTriggeringEvent(
+ bool isTriggeringEvent(
Appender* appender,
- const log4cxx::spi::LoggingEventPtr& event,
+ const spi::LoggingEventPtr& event,
const LogString& filename,
- size_t fileLength);
+ size_t fileLength) override;
/**
* Add a filter to end of the filter list.
* @param newFilter filter to add to end of list.
*/
- void addFilter(const log4cxx::spi::FilterPtr& newFilter);
+ void addFilter(const spi::FilterPtr& newFilter);
/**
* Clear the filters chain.
@@ -106,14 +106,14 @@ class LOG4CXX_EXPORT FilterBasedTriggeringPolicy : public
TriggeringPolicy
* Returns the head Filter.
*
*/
- log4cxx::spi::FilterPtr& getFilter();
+ spi::FilterPtr& getFilter();
/**
* Prepares the instance for use.
*/
- void activateOptions(log4cxx::helpers::Pool&);
+ void activateOptions(helpers::Pool&) override;
- void setOption(const LogString& option, const LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
};
LOG4CXX_PTR_DEF(FilterBasedTriggeringPolicy);
diff --git a/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h
b/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h
index f9e39849..511c32aa 100644
--- a/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h
+++ b/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h
@@ -90,9 +90,8 @@ class LOG4CXX_EXPORT FixedWindowRollingPolicy : public
RollingPolicyBase
FixedWindowRollingPolicy();
~FixedWindowRollingPolicy();
- void activateOptions(log4cxx::helpers::Pool& p);
- void setOption(const LogString& option,
- const LogString& value);
+ void activateOptions(helpers::Pool& p) override;
+ void setOption(const LogString& option, const LogString& value)
override;
void rollover();
@@ -109,7 +108,7 @@ class LOG4CXX_EXPORT FixedWindowRollingPolicy : public
RollingPolicyBase
RolloverDescriptionPtr initialize(
const LogString& currentActiveFile,
const bool append,
- log4cxx::helpers::Pool& pool);
+ helpers::Pool& pool) override;
/**
* {@inheritDoc}
@@ -117,10 +116,10 @@ class LOG4CXX_EXPORT FixedWindowRollingPolicy : public
RollingPolicyBase
RolloverDescriptionPtr rollover(
const LogString& currentActiveFile,
const bool append,
- log4cxx::helpers::Pool& pool);
+ helpers::Pool& pool) override;
protected:
- log4cxx::pattern::PatternMap getFormatSpecifiers() const;
+ log4cxx::pattern::PatternMap getFormatSpecifiers() const
override;
};
diff --git a/src/main/include/log4cxx/rolling/gzcompressaction.h
b/src/main/include/log4cxx/rolling/gzcompressaction.h
index e087cb6d..f74f70a9 100644
--- a/src/main/include/log4cxx/rolling/gzcompressaction.h
+++ b/src/main/include/log4cxx/rolling/gzcompressaction.h
@@ -55,7 +55,7 @@ class GZCompressAction : public Action
*
* @return true if successful.
*/
- virtual bool execute(log4cxx::helpers::Pool& pool) const;
+ bool execute(log4cxx::helpers::Pool& pool) const override;
private:
GZCompressAction(const GZCompressAction&);
diff --git a/src/main/include/log4cxx/rolling/manualtriggeringpolicy.h
b/src/main/include/log4cxx/rolling/manualtriggeringpolicy.h
index 49122f0f..f3a1b099 100644
--- a/src/main/include/log4cxx/rolling/manualtriggeringpolicy.h
+++ b/src/main/include/log4cxx/rolling/manualtriggeringpolicy.h
@@ -61,14 +61,14 @@ class LOG4CXX_EXPORT ManualTriggeringPolicy : public
TriggeringPolicy
* @param fileLength Length of the file in bytes.
* @return true if a rollover should occur.
*/
- virtual bool isTriggeringEvent(
+ bool isTriggeringEvent(
Appender* appender,
- const log4cxx::spi::LoggingEventPtr& event,
+ const spi::LoggingEventPtr& event,
const LogString& filename,
- size_t fileLength);
+ size_t fileLength) override;
- void activateOptions(log4cxx::helpers::Pool&);
- void setOption(const LogString& option, const LogString& value);
+ void activateOptions(helpers::Pool&) override;
+ void setOption(const LogString& option, const LogString& value)
override;
};
}
}
diff --git a/src/main/include/log4cxx/rolling/multiprocessrollingfileappender.h
b/src/main/include/log4cxx/rolling/multiprocessrollingfileappender.h
index 717b2d5b..a61795ab 100644
--- a/src/main/include/log4cxx/rolling/multiprocessrollingfileappender.h
+++ b/src/main/include/log4cxx/rolling/multiprocessrollingfileappender.h
@@ -47,7 +47,7 @@ class LOG4CXX_EXPORT MultiprocessRollingFileAppender : public
FileAppender
public:
MultiprocessRollingFileAppender();
- void activateOptions(log4cxx::helpers::Pool&);
+ void activateOptions(helpers::Pool&) override;
/**
@@ -64,14 +64,14 @@ class LOG4CXX_EXPORT MultiprocessRollingFileAppender :
public FileAppender
<code>File</code> is truncated with no backup files created.
*/
- bool rollover(log4cxx::helpers::Pool& p);
+ bool rollover(helpers::Pool& p) override;
protected:
/**
Actual writing occurs here.
*/
- virtual void subAppend(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p);
+ void subAppend(const spi::LoggingEventPtr& event,
helpers::Pool& p) override;
bool rolloverInternal(log4cxx::helpers::Pool& p);
@@ -95,7 +95,7 @@ class LOG4CXX_EXPORT MultiprocessRollingFileAppender : public
FileAppender
/**
* Close appender. Waits for any asynchronous file
compression actions to be completed.
*/
- void close();
+ void close() override;
protected:
/**
@@ -107,7 +107,7 @@ class LOG4CXX_EXPORT MultiprocessRollingFileAppender :
public FileAppender
@param os output stream, may not be null.
@return new writer.
*/
- log4cxx::helpers::WriterPtr
createWriter(log4cxx::helpers::OutputStreamPtr& os);
+ helpers::WriterPtr createWriter(helpers::OutputStreamPtr& os)
override;
public:
/**
diff --git a/src/main/include/log4cxx/rolling/rollingfileappender.h
b/src/main/include/log4cxx/rolling/rollingfileappender.h
index 6d0e9243..b44f7b8d 100644
--- a/src/main/include/log4cxx/rolling/rollingfileappender.h
+++ b/src/main/include/log4cxx/rolling/rollingfileappender.h
@@ -130,7 +130,7 @@ class LOG4CXX_EXPORT RollingFileAppender : public
FileAppender
void setOption( const LogString& option, const LogString& value
) override;
/** Prepares RollingFileAppender for use. */
- void activateOptions( log4cxx::helpers::Pool& pool );
+ void activateOptions(helpers::Pool& pool ) override;
/**
Implements the usual roll over behaviour.
@@ -153,7 +153,7 @@ class LOG4CXX_EXPORT RollingFileAppender : public
FileAppender
/**
Actual writing occurs here.
*/
- virtual void subAppend(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p);
+ void subAppend(const spi::LoggingEventPtr& event,
helpers::Pool& p) override;
bool rolloverInternal(log4cxx::helpers::Pool& p);
@@ -177,7 +177,7 @@ class LOG4CXX_EXPORT RollingFileAppender : public
FileAppender
/**
* Close appender. Waits for any asynchronous file
compression actions to be completed.
*/
- void close();
+ void close() override;
protected:
/**
@@ -189,7 +189,7 @@ class LOG4CXX_EXPORT RollingFileAppender : public
FileAppender
@param os output stream, may not be null.
@return new writer.
*/
- log4cxx::helpers::WriterPtr
createWriter(log4cxx::helpers::OutputStreamPtr& os);
+ helpers::WriterPtr createWriter(helpers::OutputStreamPtr& os)
override;
public:
/**
diff --git a/src/main/include/log4cxx/rolling/rollingpolicybase.h
b/src/main/include/log4cxx/rolling/rollingpolicybase.h
index 0f7a4bb5..4ab30008 100644
--- a/src/main/include/log4cxx/rolling/rollingpolicybase.h
+++ b/src/main/include/log4cxx/rolling/rollingpolicybase.h
@@ -56,11 +56,10 @@ class LOG4CXX_EXPORT RollingPolicyBase :
public:
RollingPolicyBase();
virtual ~RollingPolicyBase();
- virtual void activateOptions(log4cxx::helpers::Pool& p) = 0;
+ void activateOptions(log4cxx::helpers::Pool& p) override;
virtual log4cxx::pattern::PatternMap getFormatSpecifiers()
const = 0;
- virtual void setOption(const LogString& option,
- const LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
/**
* Set file name pattern.
diff --git a/src/main/include/log4cxx/rolling/sizebasedtriggeringpolicy.h
b/src/main/include/log4cxx/rolling/sizebasedtriggeringpolicy.h
index c47b40ac..b0d71e1f 100644
--- a/src/main/include/log4cxx/rolling/sizebasedtriggeringpolicy.h
+++ b/src/main/include/log4cxx/rolling/sizebasedtriggeringpolicy.h
@@ -64,18 +64,18 @@ class LOG4CXX_EXPORT SizeBasedTriggeringPolicy : public
TriggeringPolicy
* @param fileLength Length of the file in bytes.
* @return true if a rollover should occur.
*/
- virtual bool isTriggeringEvent(
+ bool isTriggeringEvent(
Appender* appender,
- const log4cxx::spi::LoggingEventPtr& event,
+ const spi::LoggingEventPtr& event,
const LogString& filename,
- size_t fileLength);
+ size_t fileLength) override;
size_t getMaxFileSize();
void setMaxFileSize(size_t l);
- void activateOptions(log4cxx::helpers::Pool&);
- void setOption(const LogString& option, const LogString& value);
+ void activateOptions(helpers::Pool&) override;
+ void setOption(const LogString& option, const LogString& value)
override;
};
LOG4CXX_PTR_DEF(SizeBasedTriggeringPolicy);
diff --git a/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h
b/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h
index 54ef05a7..69bf4469 100755
--- a/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h
+++ b/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h
@@ -158,7 +158,7 @@ class LOG4CXX_EXPORT TimeBasedRollingPolicy : public
RollingPolicyBase,
public:
TimeBasedRollingPolicy();
virtual ~TimeBasedRollingPolicy();
- void activateOptions(log4cxx::helpers::Pool& );
+ void activateOptions(helpers::Pool& ) override;
void setMultiprocess(bool multiprocess);
@@ -168,7 +168,7 @@ class LOG4CXX_EXPORT TimeBasedRollingPolicy : public
RollingPolicyBase,
RolloverDescriptionPtr initialize(
const LogString& currentActiveFile,
const bool append,
- log4cxx::helpers::Pool& pool);
+ helpers::Pool& pool) override;
/**
* {@inheritDoc}
@@ -176,7 +176,7 @@ class LOG4CXX_EXPORT TimeBasedRollingPolicy : public
RollingPolicyBase,
RolloverDescriptionPtr rollover(
const LogString& currentActiveFile,
const bool append,
- log4cxx::helpers::Pool& pool);
+ helpers::Pool& pool) override;
/**
* Determines if a rollover may be appropriate at this time. If
@@ -189,14 +189,14 @@ class LOG4CXX_EXPORT TimeBasedRollingPolicy : public
RollingPolicyBase,
* @param fileLength Length of the file in bytes.
* @return true if a rollover should occur.
*/
- virtual bool isTriggeringEvent(
+ bool isTriggeringEvent(
Appender* appender,
- const log4cxx::spi::LoggingEventPtr& event,
+ const spi::LoggingEventPtr& event,
const LogString& filename,
- size_t fileLength);
+ size_t fileLength) override;
protected:
- log4cxx::pattern::PatternMap getFormatSpecifiers() const;
+ log4cxx::pattern::PatternMap getFormatSpecifiers() const
override;
private:
diff --git a/src/main/include/log4cxx/rolling/triggeringpolicy.h
b/src/main/include/log4cxx/rolling/triggeringpolicy.h
index 439a21ad..f004aabd 100644
--- a/src/main/include/log4cxx/rolling/triggeringpolicy.h
+++ b/src/main/include/log4cxx/rolling/triggeringpolicy.h
@@ -66,7 +66,7 @@ class LOG4CXX_EXPORT TriggeringPolicy :
*/
virtual bool isTriggeringEvent(
Appender* appender,
- const log4cxx::spi::LoggingEventPtr& event,
+ const spi::LoggingEventPtr& event,
const LogString& filename,
size_t fileLength) = 0;
diff --git a/src/main/include/log4cxx/rolling/zipcompressaction.h
b/src/main/include/log4cxx/rolling/zipcompressaction.h
index 91762b10..5ed0a555 100644
--- a/src/main/include/log4cxx/rolling/zipcompressaction.h
+++ b/src/main/include/log4cxx/rolling/zipcompressaction.h
@@ -55,7 +55,7 @@ class ZipCompressAction : public Action
*
* @return true if successful.
*/
- virtual bool execute(log4cxx::helpers::Pool& pool) const;
+ bool execute(log4cxx::helpers::Pool& pool) const override;
private:
ZipCompressAction(const ZipCompressAction&);
diff --git a/src/main/include/log4cxx/simplelayout.h
b/src/main/include/log4cxx/simplelayout.h
index 58996386..9bb4f9f4 100644
--- a/src/main/include/log4cxx/simplelayout.h
+++ b/src/main/include/log4cxx/simplelayout.h
@@ -57,23 +57,23 @@ class LOG4CXX_EXPORT SimpleLayout : public Layout
@return A byte array in SimpleLayout format.
*/
- virtual void format(LogString& output,
+ void format(LogString& output,
const spi::LoggingEventPtr& event,
- log4cxx::helpers::Pool& pool) const;
+ helpers::Pool& pool) const override;
/**
The SimpleLayout does not handle the throwable contained within
{@link spi::LoggingEvent LoggingEvents}. Thus, it returns
<code>true</code>.
*/
- bool ignoresThrowable() const
+ bool ignoresThrowable() const override
{
return true;
}
- virtual void activateOptions(log4cxx::helpers::Pool& /* p */) {}
- virtual void setOption(const LogString& /* option */,
- const LogString& /* value */) {}
+ void activateOptions(helpers::Pool& /* p */) override {}
+ void setOption(const LogString& /* option */,
+ const LogString& /* value */) override {}
};
LOG4CXX_PTR_DEF(SimpleLayout);
} // namespace log4cxx
diff --git a/src/main/include/log4cxx/spi/defaultrepositoryselector.h
b/src/main/include/log4cxx/spi/defaultrepositoryselector.h
index 8059f4d0..e642b3e6 100644
--- a/src/main/include/log4cxx/spi/defaultrepositoryselector.h
+++ b/src/main/include/log4cxx/spi/defaultrepositoryselector.h
@@ -39,7 +39,7 @@ class LOG4CXX_EXPORT DefaultRepositorySelector :
DefaultRepositorySelector(const LoggerRepositoryPtr
repository1);
~DefaultRepositorySelector();
- virtual LoggerRepositoryPtr getLoggerRepository();
+ LoggerRepositoryPtr getLoggerRepository() override;
private:
LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(DefaultRepositorySelectorPrivate, m_priv)
diff --git a/src/main/include/log4cxx/spi/filter.h
b/src/main/include/log4cxx/spi/filter.h
index 6c2dfe59..46d7e55e 100644
--- a/src/main/include/log4cxx/spi/filter.h
+++ b/src/main/include/log4cxx/spi/filter.h
@@ -65,8 +65,7 @@ Linux ipchains.
<p>Note that filtering is only supported by the {@link
xml::DOMConfigurator DOMConfigurator}.
*/
-class LOG4CXX_EXPORT Filter : public virtual OptionHandler,
- public virtual helpers::Object
+class LOG4CXX_EXPORT Filter : public virtual OptionHandler
{
protected:
LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(FilterPrivate, m_priv)
@@ -110,8 +109,8 @@ class LOG4CXX_EXPORT Filter : public virtual OptionHandler,
default do-nothing implementation for convenience.
*/
- void activateOptions(log4cxx::helpers::Pool& p);
- void setOption(const LogString& option, const LogString& value);
+ void activateOptions(helpers::Pool& p) override;
+ void setOption(const LogString& option, const LogString& value)
override;
/**
<p>If the decision is <code>DENY</code>, then the event will be
diff --git a/src/main/include/log4cxx/spi/loggerfactory.h
b/src/main/include/log4cxx/spi/loggerfactory.h
index 846c69b8..9d480946 100644
--- a/src/main/include/log4cxx/spi/loggerfactory.h
+++ b/src/main/include/log4cxx/spi/loggerfactory.h
@@ -34,9 +34,7 @@ class LOG4CXX_EXPORT LoggerFactory : public virtual
helpers::Object
public:
DECLARE_ABSTRACT_LOG4CXX_OBJECT(LoggerFactory)
virtual ~LoggerFactory() {}
- virtual LoggerPtr makeNewLoggerInstance(
- log4cxx::helpers::Pool& pool,
- const LogString& name) const = 0;
+ virtual LoggerPtr makeNewLoggerInstance(helpers::Pool& pool,
const LogString& name) const = 0;
};
diff --git a/src/main/include/log4cxx/spi/optionhandler.h
b/src/main/include/log4cxx/spi/optionhandler.h
index 18b74bfc..1daeb6c3 100644
--- a/src/main/include/log4cxx/spi/optionhandler.h
+++ b/src/main/include/log4cxx/spi/optionhandler.h
@@ -49,7 +49,7 @@ class LOG4CXX_EXPORT OptionHandler : public virtual
helpers::Object
FileAppender#setFile File} and {@link
FileAppender#setAppend Append} options both of
which are ambigous until the other is also set. */
- virtual void activateOptions(log4cxx::helpers::Pool& p) = 0;
+ virtual void activateOptions(helpers::Pool& p) = 0;
/**
diff --git a/src/main/include/log4cxx/varia/fallbackerrorhandler.h
b/src/main/include/log4cxx/varia/fallbackerrorhandler.h
index e49e638b..7676fac3 100644
--- a/src/main/include/log4cxx/varia/fallbackerrorhandler.h
+++ b/src/main/include/log4cxx/varia/fallbackerrorhandler.h
@@ -58,14 +58,14 @@ class LOG4CXX_EXPORT FallbackErrorHandler :
<em>Adds</em> the logger passed as parameter to the list of
loggers that we need to search for in case of appender failure.
*/
- void setLogger(const LoggerPtr& logger);
+ void setLogger(const LoggerPtr& logger) override;
/**
No options to activate.
*/
- void activateOptions(log4cxx::helpers::Pool& p);
- void setOption(const LogString& option, const LogString& value);
+ void activateOptions(helpers::Pool& p) override;
+ void setOption(const LogString& option, const LogString& value)
override;
/**
@@ -73,31 +73,31 @@ class LOG4CXX_EXPORT FallbackErrorHandler :
<code>System.err</code>.
*/
void error(const LogString& message, const std::exception& e,
- int errorCode) const;
+ int errorCode) const override;
/**
Prints the message and the stack trace of the exception on
<code>System.err</code>.
*/
void error(const LogString& message, const std::exception& e,
- int errorCode, const spi::LoggingEventPtr& event) const;
+ int errorCode, const spi::LoggingEventPtr& event) const
override;
/**
Print a the error message passed as parameter on
<code>System.err</code>.
*/
- void error(const LogString& /* message */) const {}
+ void error(const LogString& /* message */) const override {}
/**
The appender to which this error handler is attached.
*/
- void setAppender(const AppenderPtr& primary);
+ void setAppender(const AppenderPtr& primary) override;
/**
Set the backup appender.
*/
- void setBackupAppender(const AppenderPtr& backup);
+ void setBackupAppender(const AppenderPtr& backup) override;
};
LOG4CXX_PTR_DEF(FallbackErrorHandler);
diff --git a/src/main/include/log4cxx/writerappender.h
b/src/main/include/log4cxx/writerappender.h
index 8b276918..bf07f5c0 100644
--- a/src/main/include/log4cxx/writerappender.h
+++ b/src/main/include/log4cxx/writerappender.h
@@ -66,7 +66,7 @@ class LOG4CXX_EXPORT WriterAppender : public AppenderSkeleton
Derived appenders should override this method if option
structure
requires it.
*/
- virtual void activateOptions(log4cxx::helpers::Pool& pool);
+ void activateOptions(helpers::Pool& pool) override;
/**
If the <b>ImmediateFlush</b> option is set to
@@ -100,7 +100,7 @@ class LOG4CXX_EXPORT WriterAppender : public
AppenderSkeleton
layout.
*/
- virtual void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p);
+ void append(const spi::LoggingEventPtr& event, helpers::Pool&
p) override;
protected:
@@ -120,7 +120,7 @@ class LOG4CXX_EXPORT WriterAppender : public
AppenderSkeleton
<p>Closed appenders cannot be reused.
*/
- virtual void close();
+ void close() override;
protected:
/**
@@ -134,14 +134,12 @@ class LOG4CXX_EXPORT WriterAppender : public
AppenderSkeleton
<code>encoding</code> property. If the encoding value is
specified incorrectly the writer will be opened using the
default
system encoding (an error message will be printed to the
loglog. */
- virtual log4cxx::helpers::WriterPtr createWriter(
- log4cxx::helpers::OutputStreamPtr& os);
+ virtual helpers::WriterPtr
createWriter(helpers::OutputStreamPtr& os);
public:
LogString getEncoding() const;
void setEncoding(const LogString& value);
- void setOption(const LogString& option,
- const LogString& value);
+ void setOption(const LogString& option, const LogString& value)
override;
/**
<p>Sets the Writer where the log output will go. The
@@ -159,7 +157,7 @@ class LOG4CXX_EXPORT WriterAppender : public
AppenderSkeleton
const log4cxx::helpers::WriterPtr getWriter() const;
- virtual bool requiresLayout() const;
+ bool requiresLayout() const override;
protected:
/**
diff --git a/src/main/include/log4cxx/xml/domconfigurator.h
b/src/main/include/log4cxx/xml/domconfigurator.h
index 5c19079e..7f1bddfc 100644
--- a/src/main/include/log4cxx/xml/domconfigurator.h
+++ b/src/main/include/log4cxx/xml/domconfigurator.h
@@ -278,7 +278,7 @@ class LOG4CXX_EXPORT DOMConfigurator :
@param repository The hierarchy to operation upon.
*/
void doConfigure(const File& filename,
- spi::LoggerRepositoryPtr repository);
+ spi::LoggerRepositoryPtr repository) override;
protected:
static LogString getAttribute(
diff --git a/src/main/include/log4cxx/xml/xmllayout.h
b/src/main/include/log4cxx/xml/xmllayout.h
index 90eda790..2bde2bc9 100644
--- a/src/main/include/log4cxx/xml/xmllayout.h
+++ b/src/main/include/log4cxx/xml/xmllayout.h
@@ -99,27 +99,27 @@ class LOG4CXX_EXPORT XMLLayout : public Layout
/** No options to activate. */
- void activateOptions(log4cxx::helpers::Pool& /* p */) { }
+ void activateOptions(helpers::Pool& /* p */) override { }
/**
Set options
*/
- virtual void setOption(const LogString& option,
- const LogString& value);
+ void setOption(const LogString& option,
+ const LogString& value) override;
/**
* Formats a {@link spi::LoggingEvent LoggingEvent}
* in conformance with the log4cxx.dtd.
**/
- virtual void format(LogString& output,
+ void format(LogString& output,
const spi::LoggingEventPtr& event,
- log4cxx::helpers::Pool& p) const;
+ helpers::Pool& p) const override;
/**
The XMLLayout prints and does not ignore exceptions. Hence the
return value <code>false</code>.
*/
- virtual bool ignoresThrowable() const
+ bool ignoresThrowable() const override
{
return false;
}
diff --git a/src/test/cpp/abts.cpp b/src/test/cpp/abts.cpp
index 5843d649..1efb8344 100644
--- a/src/test/cpp/abts.cpp
+++ b/src/test/cpp/abts.cpp
@@ -108,7 +108,7 @@ static void end_suite(abts_suite* suite)
}
else
{
- fprintf(stdout, "FAILED %d of %d\n",
last->failed.size(), last->num_test);
+ fprintf(stdout, "FAILED %d of %d\n",
(int)last->failed.size(), last->num_test);
fflush(stdout);
}
}
@@ -217,7 +217,7 @@ void abts_run_test(abts_suite* ts, const char* name,
test_func f, void* value)
static int report(abts_suite* suite)
{
- int count = 0;
+ size_t count = 0;
sub_suite* dptr;
if (suite && suite->tail && !suite->tail->not_run)
@@ -251,7 +251,7 @@ static int report(abts_suite* suite)
{
float percent = ((float)dptr->failed.size() /
(float)dptr->num_test);
fprintf(stdout, "%-15s\t\t%5d\t%4d\t%6.2f%%\n",
dptr->name,
- dptr->num_test, dptr->failed.size(), percent *
100);
+ dptr->num_test, (int)dptr->failed.size(),
percent * 100);
for( const char* failed_name : dptr->failed ){
fprintf(stdout, " %s\n", failed_name );
}
diff --git a/src/test/cpp/asyncappendertestcase.cpp
b/src/test/cpp/asyncappendertestcase.cpp
index edcf4c12..dedbded9 100644
--- a/src/test/cpp/asyncappendertestcase.cpp
+++ b/src/test/cpp/asyncappendertestcase.cpp
@@ -48,16 +48,16 @@ class NullPointerAppender : public AppenderSkeleton
/**
* @{inheritDoc}
*/
- void append(const spi::LoggingEventPtr&,
log4cxx::helpers::Pool&)
+ void append(const spi::LoggingEventPtr&,
log4cxx::helpers::Pool&) override
{
throw NullPointerException(LOG4CXX_STR("Intentional
NullPointerException"));
}
- void close()
+ void close() override
{
}
- bool requiresLayout() const
+ bool requiresLayout() const override
{
return false;
}
@@ -81,7 +81,7 @@ class BlockableVectorAppender : public VectorAppender
/**
* {@inheritDoc}
*/
- void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p)
+ void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p) override
{
std::unique_lock<std::mutex> lock( blocker );
VectorAppender::append(event, p);
diff --git a/src/test/cpp/benchmark/benchmark.cpp
b/src/test/cpp/benchmark/benchmark.cpp
index 8a3f84e5..8641b742 100644
--- a/src/test/cpp/benchmark/benchmark.cpp
+++ b/src/test/cpp/benchmark/benchmark.cpp
@@ -21,24 +21,24 @@ public:
NullWriterAppender() {}
- virtual void close() {}
+ void close() override {}
- virtual bool requiresLayout() const
+ bool requiresLayout() const override
{
return true;
}
- virtual void append(const spi::LoggingEventPtr& event, helpers::Pool& p)
+ void append(const spi::LoggingEventPtr& event, helpers::Pool& p)
override
{
// This gets called whenever there is a valid event for our
appender.
}
- virtual void activateOptions(helpers::Pool& /* pool */)
+ void activateOptions(helpers::Pool& /* pool */) override
{
// Given all of our options, do something useful(e.g. open a
file)
}
- virtual void setOption(const LogString& option, const LogString& value)
+ void setOption(const LogString& option, const LogString& value) override
{
}
};
diff --git a/src/test/cpp/customlogger/xlogger.h
b/src/test/cpp/customlogger/xlogger.h
index 5d09c437..916b6143 100644
--- a/src/test/cpp/customlogger/xlogger.h
+++ b/src/test/cpp/customlogger/xlogger.h
@@ -43,9 +43,9 @@ class XFactory :
END_LOG4CXX_CAST_MAP()
XFactory();
- virtual LoggerPtr makeNewLoggerInstance(
+ LoggerPtr makeNewLoggerInstance(
log4cxx::helpers::Pool& pool,
- const LogString& name) const;
+ const LogString& name) const override;
};
typedef std::shared_ptr<XFactory> XFactoryPtr;
diff --git a/src/test/cpp/loggertestcase.cpp b/src/test/cpp/loggertestcase.cpp
index 5ab29662..942b829e 100644
--- a/src/test/cpp/loggertestcase.cpp
+++ b/src/test/cpp/loggertestcase.cpp
@@ -46,15 +46,15 @@ class CountingAppender : public AppenderSkeleton
CountingAppender() : counter(0)
{}
- void close()
+ void close() override
{}
- void append(const spi::LoggingEventPtr& /*event*/, Pool& /*p*/)
+ void append(const spi::LoggingEventPtr& /*event*/, Pool& /*p*/)
override
{
counter++;
}
- bool requiresLayout() const
+ bool requiresLayout() const override
{
return true;
}
diff --git a/src/test/cpp/net/smtpappendertestcase.cpp
b/src/test/cpp/net/smtpappendertestcase.cpp
index 2259b220..a3ba3770 100644
--- a/src/test/cpp/net/smtpappendertestcase.cpp
+++ b/src/test/cpp/net/smtpappendertestcase.cpp
@@ -52,7 +52,7 @@ class MockTriggeringEventEvaluator :
{
}
- virtual bool isTriggeringEvent(const spi::LoggingEventPtr&
event)
+ bool isTriggeringEvent(const spi::LoggingEventPtr& event)
override
{
return true;
}
diff --git a/src/test/cpp/pattern/num343patternconverter.h
b/src/test/cpp/pattern/num343patternconverter.h
index ce3d81c3..7ab63f0a 100644
--- a/src/test/cpp/pattern/num343patternconverter.h
+++ b/src/test/cpp/pattern/num343patternconverter.h
@@ -35,7 +35,7 @@ class Num343PatternConverter : public
LoggingEventPatternConverter
void format(
const log4cxx::spi::LoggingEventPtr& event,
LogString& toAppendTo,
- log4cxx::helpers::Pool& pool) const;
+ log4cxx::helpers::Pool& pool) const override;
};
}
}
diff --git a/src/test/cpp/throughput/log4cxxbenchmarker.cpp
b/src/test/cpp/throughput/log4cxxbenchmarker.cpp
index add71bbb..da80abcc 100644
--- a/src/test/cpp/throughput/log4cxxbenchmarker.cpp
+++ b/src/test/cpp/throughput/log4cxxbenchmarker.cpp
@@ -36,24 +36,24 @@ class NullWriterAppender : public log4cxx::AppenderSkeleton
NullWriterAppender() {}
- virtual void close() {}
+ void close() override {}
- virtual bool requiresLayout() const
+ bool requiresLayout() const override
{
return true;
}
- virtual void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p)
+ void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p) override
{
// This gets called whenever there is a valid event for
our appender.
}
- virtual void activateOptions(log4cxx::helpers::Pool& /* pool */)
+ void activateOptions(log4cxx::helpers::Pool& /* pool */)
override
{
// Given all of our options, do something useful(e.g.
open a file)
}
- virtual void setOption(const LogString& option, const
LogString& value)
+ void setOption(const LogString& option, const LogString& value)
override
{
}
};
diff --git a/src/test/cpp/vectorappender.h b/src/test/cpp/vectorappender.h
index 2895e4f4..2e6d4171 100644
--- a/src/test/cpp/vectorappender.h
+++ b/src/test/cpp/vectorappender.h
@@ -43,21 +43,21 @@ class VectorAppender : public AppenderSkeleton
This method is called by the AppenderSkeleton#doAppend
method.
*/
- void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p);
+ void append(const spi::LoggingEventPtr& event,
log4cxx::helpers::Pool& p) override;
const std::vector<spi::LoggingEventPtr>& getVector() const
{
return vector;
}
- void close();
+ void close() override;
bool isClosed() const
{
return m_priv->closed;
}
- bool requiresLayout() const
+ bool requiresLayout() const override
{
return false;
}