diff options
author | ramverma <ram.krishna.verma@ericsson.com> | 2018-07-31 18:25:39 +0100 |
---|---|---|
committer | ramverma <ram.krishna.verma@ericsson.com> | 2018-07-31 18:27:31 +0100 |
commit | af74a6270d6ab6badf04a97495a6ef8ccded9b4b (patch) | |
tree | 2c7a536e54207a0870ca2008ce457a64de917ab9 /src/site-docs/adoc/fragments/howto-logging/logging-policy-logic.adoc | |
parent | 9e318f20f2e64970bf3c2e3a5532c516231a6f8a (diff) |
Adding first set of apex-pdp document changes
Adding document changes for auth, context, core, model, services & the
main apex-pdp module.
Change-Id: Id0d026baa258f1dc6998978f9911f3c4a73b5b3b
Issue-ID: POLICY-867
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
Diffstat (limited to 'src/site-docs/adoc/fragments/howto-logging/logging-policy-logic.adoc')
-rw-r--r-- | src/site-docs/adoc/fragments/howto-logging/logging-policy-logic.adoc | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/site-docs/adoc/fragments/howto-logging/logging-policy-logic.adoc b/src/site-docs/adoc/fragments/howto-logging/logging-policy-logic.adoc new file mode 100644 index 000000000..779e45458 --- /dev/null +++ b/src/site-docs/adoc/fragments/howto-logging/logging-policy-logic.adoc @@ -0,0 +1,54 @@ +// +// ============LICENSE_START======================================================= +// Copyright (C) 2016-2018 Ericsson. All rights reserved. +// ================================================================================ +// This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE +// Full license text at https://creativecommons.org/licenses/by/4.0/legalcode +// +// SPDX-License-Identifier: CC-BY-4.0 +// ============LICENSE_END========================================================= +// +// @author Sven van der Meer (sven.van.der.meer@ericsson.com) +// + +== Configuring loggers for Policy Logic + +The logging for the logic inside a policy (task logic, task selection logic, state finalizer logic) can be configured separate from standard logging. +The logger for policy logic is `org.onap.policy.apex.executionlogging`. +The following example defines + +- a new appender for policy logic logging to standard out using a very simple pattern (simply the actual message) +- a logger for policy logic to standard out using the new appender +- a logger for policy logic to the standard `FILE` appender + +[source%nowrap,xml] +---- +<appender name="POLICY_APPENDER_STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>policy: %msg\n</pattern> + </encoder> +</appender> + +<appender name="POLICY_APPENDER_STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>policy: %msg\n</pattern> + </encoder> +</appender> + +<logger name="org.onap.policy.apex.executionlogging" level="info" additivity="false"> + <appender-ref ref="POLICY_APPENDER_STDOUT" /> + <appender-ref ref="FILE" /> +</logger> + +---- + +It is also possible to use specific logging for parts of policy logic. +The following example defines a logger for task logic. + +[source%nowrap,xml] +---- +<logger name="org.onap.policy.apex.executionlogging.TaskExecutionLogging" level="TRACE" additivity="false"> + <appender-ref ref="STDOUT" /> +</logger> +---- + |