blob: 2055fe448b87e122bf89d9be05da37d8a031c5cd [file] [log] [blame]
Guillaume Nodet05fac962009-04-27 10:01:58 +00001<?xml version="1.0" encoding="UTF-8"?>
2<!--
3
4 Licensed to the Apache Software Foundation (ASF) under one or more
5 contributor license agreements. See the NOTICE file distributed with
6 this work for additional information regarding copyright ownership.
7 The ASF licenses this file to You under the Apache License, Version 2.0
8 (the "License"); you may not use this file except in compliance with
9 the License. You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18
19-->
20<beans xmlns="http://www.springframework.org/schema/beans"
21 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22 xmlns:ctx="http://www.springframework.org/schema/context"
23 xmlns:osgi="http://www.springframework.org/schema/osgi"
24 xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
25 xmlns:util="http://www.springframework.org/schema/util"
26 xmlns:gshell="http://servicemix.apache.org/schema/servicemix-gshell"
27 xsi:schemaLocation="
28 http://www.springframework.org/schema/beans
29 http://www.springframework.org/schema/beans/spring-beans.xsd
30 http://www.springframework.org/schema/context
31 http://www.springframework.org/schema/context/spring-context.xsd
32 http://www.springframework.org/schema/osgi
33 http://www.springframework.org/schema/osgi/spring-osgi.xsd
34 http://www.springframework.org/schema/osgi-compendium
35 http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
36 http://www.springframework.org/schema/util
37 http://www.springframework.org/schema/util/spring-util.xsd
38 http://servicemix.apache.org/schema/servicemix-gshell
39 http://servicemix.apache.org/schema/servicemix-gshell/servicemix-gshell.xsd">
40
41 <import resource="classpath:org/apache/servicemix/kernel/gshell/core/commands.xml" />
42
43 <gshell:command-bundle>
44 <gshell:command name="log/display">
45 <gshell:action class="org.apache.servicemix.kernel.gshell.log.DisplayLog">
46 <property name="events" ref="events" />
47 <property name="pattern" value="${pattern}" />
48 </gshell:action>
49 </gshell:command>
50 <gshell:link name="log/d" target="log/display" />
51 <gshell:command name="log/display-exception">
52 <gshell:action class="org.apache.servicemix.kernel.gshell.log.DisplayException">
53 <property name="events" ref="events" />
54 </gshell:action>
55 </gshell:command>
56 <gshell:link name="log/de" target="log/display-exception" />
57 <gshell:command name="log/get">
58 <gshell:action class="org.apache.servicemix.kernel.gshell.log.GetLogLevel" />
59 </gshell:command>
60 <gshell:command name="log/set">
61 <gshell:action class="org.apache.servicemix.kernel.gshell.log.SetLogLevel" />
62 </gshell:command>
63
64 <gshell:alias name="ld" alias="log/d" />
65 <gshell:alias name="lde" alias="log/de" />
66 </gshell:command-bundle>
67
68 <bean id="vmLogAppender" class="org.apache.servicemix.kernel.gshell.log.VmLogAppender">
69 <property name="events" ref="events" />
70 </bean>
71
72 <bean id="events" class="org.apache.servicemix.kernel.gshell.log.LruList">
73 <constructor-arg value="${size}" />
74 </bean>
75
76 <osgi:service ref="vmLogAppender" interface="org.ops4j.pax.logging.spi.PaxAppender">
77 <osgi:service-properties>
78 <entry>
79 <key><util:constant static-field="org.ops4j.pax.logging.PaxLoggingService.APPENDER_NAME_PROPERTY"/></key>
80 <value>VmLogAppender</value>
81 </entry>
82 </osgi:service-properties>
83 </osgi:service>
84
85 <osgix:cm-properties id="cmProps" persistent-id="org.apache.servicemix.log">
86 <prop key="size">500</prop>
87 <prop key="pattern">%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n</prop>
88 </osgix:cm-properties>
89
90 <ctx:property-placeholder properties-ref="cmProps" />
91
92</beans>