You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by sw...@apache.org on 2022/12/19 22:21:54 UTC
[logging-log4cxx] 02/02: Improve ConsoleAppender docs
This is an automated email from the ASF dual-hosted git repository.
swebb2066 pushed a commit to branch improve_usage_md
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
commit 907ee4e3e44590b46b81f1512641eaac2ed9a497
Author: Stephen Webb <st...@sabreautonomous.com.au>
AuthorDate: Tue Dec 20 09:20:49 2022 +1100
Improve ConsoleAppender docs
---
src/main/include/log4cxx/consoleappender.h | 41 +++++++++++++++++++++++-------
1 file changed, 32 insertions(+), 9 deletions(-)
diff --git a/src/main/include/log4cxx/consoleappender.h b/src/main/include/log4cxx/consoleappender.h
index 54a7178b..21a92075 100644
--- a/src/main/include/log4cxx/consoleappender.h
+++ b/src/main/include/log4cxx/consoleappender.h
@@ -40,30 +40,53 @@ class LOG4CXX_EXPORT ConsoleAppender : public WriterAppender
LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
END_LOG4CXX_CAST_MAP()
+ /**
+ * A <code>stdout</code> log event appender.
+ *
+ * See also #setLayout and #setTarget.
+ */
ConsoleAppender();
+
+ /**
+ * A <code>stdout</code> log event appender formatted using \c layout.
+ *
+ * @param layout formats a log event
+ */
ConsoleAppender(const LayoutPtr& layout);
+
+ /**
+ * A \c target log event appender formatted using \c layout.
+ *
+ * @param layout formats a log event
+ * @param target the value provided by #getSystemOut or #getSystemErr
+ */
ConsoleAppender(const LayoutPtr& layout, const LogString& target);
~ConsoleAppender();
/**
- * Sets the value of the <b>target</b> property. Recognized values
- * are "System.out" and "System.err". Any other value will be
- * ignored.
+ * Use \c newValue for the <b>target</b> property.
+ *
+ * @param newValue the value provided by #getSystemOut or #getSystemErr
* */
- void setTarget(const LogString& value);
+ void setTarget(const LogString& newValue);
/**
- * Returns the current value of the <b>target</b> property. The
- * default value of the option is "System.out".
- *
- * See also #setTarget.
- * */
+ * @returns the current value of the <b>target</b> property.
+ */
LogString getTarget() const;
void activateOptions(helpers::Pool& p) override;
void setOption(const LogString& option, const LogString& value) override;
+
+ /**
+ * @returns the name recognised as <code>stdout</code>.
+ */
static const LogString& getSystemOut();
+
+ /**
+ * @returns the name recognised as <code>stderr</code>.
+ */
static const LogString& getSystemErr();