diff options
author | liamfallon <liam.fallon@ericsson.com> | 2018-09-05 15:46:31 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@ericsson.com> | 2018-09-06 13:26:24 +0100 |
commit | a41c877a6b1980e0e866699633e0289d9a3fdbb5 (patch) | |
tree | 4f8d15559549760c2e74880871ec08c3b8df2d0e /src/site-docs/adoc/fragments/howto-logging | |
parent | 825ae627d4378c5cc7ab4b7d5f4b4ffefcb7977e (diff) |
Fix package of apex examples and documents
The examples are not packaged correctly in the apex build
and the client wars are missing
The links and location of the documents are corrected.
Some POM duplicate dependencies removed.
Javadoc warnings removed.
Issue-ID: POLICY-867
Change-Id: I555c29191c61c0a9887365d95005dbc584eddf04
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'src/site-docs/adoc/fragments/howto-logging')
4 files changed, 68 insertions, 78 deletions
diff --git a/src/site-docs/adoc/fragments/howto-logging/example-logic.adoc b/src/site-docs/adoc/fragments/howto-logging/example-logic.adoc index 788894572..8f22cb498 100644 --- a/src/site-docs/adoc/fragments/howto-logging/example-logic.adoc +++ b/src/site-docs/adoc/fragments/howto-logging/example-logic.adoc @@ -13,52 +13,52 @@ == Example Configuration for Logging Logic -The following example shows a configuration that logs policy logic to standard out (__info__) and a file (__debug__) -All other APEX components are logging to a file (__debug__) and standard out (__error__). +The following example shows a configuration that logs policy logic to standard out and a file (__info__). +All other APEX components are logging to a file (__debug__).. This configuration an be used in a pre-production phase with the APEX engine still running in a separate terminal to monitor policy execution. -This logback configuration is in the APEX installation as `etc/logback-logic.xml` +This logback configuration is in the APEX installation as `etc/logback-logic.xml`. [source%nowrap,xml] ---- <configuration debug="false"> - <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> + <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> - <contextName>Apex</contextName> - <property name="VAR_LOG" value="/var/log/ericsson/apex/" /> + <contextName>Apex</contextName> + <property name="VAR_LOG" value="/var/log/onap/policy/apex-pdp/" /> - <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> - <encoder> - <Pattern>%d %contextName [%t] %level %logger{36} - %msg%n</Pattern> - </encoder> - </appender> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <Pattern>%d %contextName [%t] %level %logger{36} - %msg%n</Pattern> + </encoder> + </appender> - <appender name="FILE" class="ch.qos.logback.core.FileAppender"> - <file>${VAR_LOG}/apex.log</file> - <encoder> - <pattern> - %d %-5relative [procId=${processId}] [%thread] %-5level%logger{26} - %msg %n %ex{full} - </pattern> - </encoder> - </appender> + <appender name="FILE" class="ch.qos.logback.core.FileAppender"> + <file>${VAR_LOG}/apex.log</file> + <encoder> + <pattern> + %d %-5relative [procId=${processId}] [%thread] %-5level%logger{26} - %msg %n %ex{full} + </pattern> + </encoder> + </appender> - <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> - <root level="error"> - <appender-ref ref="STDOUT" /> - </root> + <root level="error"> + <appender-ref ref="STDOUT" /> + </root> -<logger name="org.onap.policy.apex" level="debug" additivity="false"> - <appender-ref ref="FILE" /> -</logger> + <logger name="org.onap.policy.apex" level="debug" additivity="false"> + <appender-ref ref="FILE" /> + </logger> - <logger name="org.onap.policy.apex.executionlogging" level="debug" additivity="false"> - <appender-ref ref="POLICY_APPENDER_STDOUT" /> - <appender-ref ref="FILE" /> - </logger> + <logger name="org.onap.policy.apex.executionlogging" level="info" additivity="false"> + <appender-ref ref="POLICY_APPENDER_STDOUT" /> + <appender-ref ref="FILE" /> + </logger> </configuration> ---- diff --git a/src/site-docs/adoc/fragments/howto-logging/example-server.adoc b/src/site-docs/adoc/fragments/howto-logging/example-server.adoc index b438bd4a7..8f40a4217 100644 --- a/src/site-docs/adoc/fragments/howto-logging/example-server.adoc +++ b/src/site-docs/adoc/fragments/howto-logging/example-server.adoc @@ -20,27 +20,27 @@ This logback configuration is in the APEX installation as `logback-server.xml` [source%nowrap,xml] ---- <configuration debug="false"> - <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> - - <contextName>Apex</contextName> - <property name="VAR_LOG" value="/var/log/ericsson/apex/" /> - - <appender name="FILE" class="ch.qos.logback.core.FileAppender"> - <file>${VAR_LOG}/apex.log</file> - <encoder> - <pattern> - %d %-5relative [procId=${processId}] [%thread] %-5level%logger{26} - %msg %n %ex{full} - </pattern> - </encoder> - </appender> - - <root level="debug"> - <appender-ref ref="FILE" /> - </root> - - <logger name="org.onap.policy.apex.executionlogging" level="debug" additivity="false"> - <appender-ref ref="FILE" /> - </logger> + <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> + + <contextName>Apex</contextName> + <property name="VAR_LOG" value="/var/log/onap/policy/apex-pdp/" /> + + <appender name="FILE" class="ch.qos.logback.core.FileAppender"> + <file>${VAR_LOG}/apex.log</file> + <encoder> + <pattern> + %d %-5relative [procId=${processId}] [%thread] %-5level%logger{26} - %msg %n %ex{full} + </pattern> + </encoder> + </appender> + + <root level="debug"> + <appender-ref ref="FILE" /> + </root> + + <logger name="org.onap.policy.apex.executionlogging" level="debug" additivity="false"> + <appender-ref ref="FILE" /> + </logger> </configuration> ---- 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 index 779e45458..a0cc02591 100644 --- a/src/site-docs/adoc/fragments/howto-logging/logging-policy-logic.adoc +++ b/src/site-docs/adoc/fragments/howto-logging/logging-policy-logic.adoc @@ -17,9 +17,8 @@ The logging for the logic inside a policy (task logic, task selection logic, sta 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 +- a new appender for standard out using a very simple pattern (simply the actual message) +- a logger for policy logic to standard out using the new appender and the already described file appender. [source%nowrap,xml] ---- @@ -29,12 +28,6 @@ The following example defines </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" /> @@ -48,7 +41,7 @@ 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" /> + <appender-ref ref="POLICY_APPENDER_STDOUT" /> </logger> ---- diff --git a/src/site-docs/adoc/fragments/howto-logging/standard-configuration.adoc b/src/site-docs/adoc/fragments/howto-logging/standard-configuration.adoc index a09b3d27e..4cd4b9b67 100644 --- a/src/site-docs/adoc/fragments/howto-logging/standard-configuration.adoc +++ b/src/site-docs/adoc/fragments/howto-logging/standard-configuration.adoc @@ -14,7 +14,7 @@ == Standard Logging Configuration The standard logging configuration defines a context __APEX__, which is used in the standard output pattern. -The location for log files is defined in the property `VAR_LOG` and set to `/var/log/apex`. +The location for log files is defined in the property `VAR_LOG` and set to `/var/log/onap/policy/apex-pdp`. The standard status listener is set to __NOP__ and the overall logback configuration is set to no debug. [source%nowrap,xml,numbered] @@ -23,7 +23,7 @@ The standard status listener is set to __NOP__ and the overall logback configura <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> <contextName>Apex</contextName> - <property name="VAR_LOG" value="/var/log/ericsson/apex/" /> + <property name="VAR_LOG" value="/var/log/onap/policy/apex-pdp/" /> ...appenders ...loggers @@ -49,38 +49,35 @@ The root level logger then is set to the level __info__ using the standard out a </root> ---- -The first appender is called `FILE`. +The second appender is called `FILE`. It writes logs to a file `apex.log`. [source%nowrap,xml,numbered] ---- <appender name="FILE" class="ch.qos.logback.core.FileAppender"> <file>${VAR_LOG}/apex.log</file> <encoder> - <pattern> - %d %-5relative [procId=${processId}] [%thread] %-5level%logger{26} - %msg %n %ex{full} - </pattern> + <pattern>%d %-5relative [procId=${processId}] [%thread] %-5level %logger{26} - %msg %n %ex{full}</pattern> </encoder> </appender> ---- -The first appender is called `CTXT_FILE`. +The third appender is called `CTXT_FILE`. It writes logs to a file `apex_ctxt.log`. [source%nowrap,xml,numbered] ---- <appender name="CTXT_FILE" class="ch.qos.logback.core.FileAppender"> <file>${VAR_LOG}/apex_ctxt.log</file> <encoder> - <pattern> - %d %-5relative [procId=${processId}] [%thread] %-5level%logger{26} - %msg %n %ex{full} - </pattern> + <pattern>%d %-5relative [procId=${processId}] [%thread] %-5level %logger{26} - %msg %n %ex{full}</pattern> </encoder> </appender> ---- The last definitions are for specific loggers. -The first logger captures all standard APEX classes, appends logs to `STDOUT` with the log level __info__. -The second logger capture all standard APEX classes, appends logs to `FILE` with log level __info__. -The third logger captures context monitoring classes, appends logs to `CTXT_FILE` with log level __trace__. +The first logger captures all standard APEX classes. +It is configured for log level __info__ and uses the standard output and file appenders. +The second logger captures APEX context classes responsible for context monitoring. +It is configured for log level __trace__ and uses the context file appender. [source%nowrap,xml,numbered] ---- |