blob: b438bd4a74b3581f395e32340cdd8a659682cc79 [file] [log] [blame]
ramvermaaf74a622018-07-31 18:25:39 +01001//
2// ============LICENSE_START=======================================================
3// Copyright (C) 2016-2018 Ericsson. All rights reserved.
4// ================================================================================
5// This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE
6// Full license text at https://creativecommons.org/licenses/by/4.0/legalcode
7//
8// SPDX-License-Identifier: CC-BY-4.0
9// ============LICENSE_END=========================================================
10//
11// @author Sven van der Meer (sven.van.der.meer@ericsson.com)
12//
13
14== Example Configuration for a Production Server
15
16The following example shows a configuration that logs all APEX components, including policy logic, to a file (__debug__).
17This configuration an be used in a production phase with the APEX engine being executed as a service on a system without console output.
18This logback configuration is in the APEX installation as `logback-server.xml`
19
20[source%nowrap,xml]
21----
22<configuration debug="false">
23 <statusListener class="ch.qos.logback.core.status.NopStatusListener" />
24
25 <contextName>Apex</contextName>
26 <property name="VAR_LOG" value="/var/log/ericsson/apex/" />
27
28 <appender name="FILE" class="ch.qos.logback.core.FileAppender">
29 <file>${VAR_LOG}/apex.log</file>
30 <encoder>
31 <pattern>
32 %d %-5relative [procId=${processId}] [%thread] %-5level%logger{26} - %msg %n %ex{full}
33 </pattern>
34 </encoder>
35 </appender>
36
37 <root level="debug">
38 <appender-ref ref="FILE" />
39 </root>
40
41 <logger name="org.onap.policy.apex.executionlogging" level="debug" additivity="false">
42 <appender-ref ref="FILE" />
43 </logger>
44</configuration>
45----
46