Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 1 | <?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 | |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 41 | <gshell:command-bundle> |
| 42 | <gshell:command name="log/display"> |
Gert Vanthienen | f54a839 | 2009-05-02 19:57:13 +0000 | [diff] [blame] | 43 | <gshell:action class="org.apache.felix.karaf.gshell.log.DisplayLog"> |
Guillaume Nodet | 810fec9 | 2009-05-04 11:26:15 +0000 | [diff] [blame] | 44 | <property name="bundleContext" ref="bundleContext"/> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 45 | <property name="events" ref="events" /> |
| 46 | <property name="pattern" value="${pattern}" /> |
| 47 | </gshell:action> |
| 48 | </gshell:command> |
| 49 | <gshell:link name="log/d" target="log/display" /> |
| 50 | <gshell:command name="log/display-exception"> |
Gert Vanthienen | f54a839 | 2009-05-02 19:57:13 +0000 | [diff] [blame] | 51 | <gshell:action class="org.apache.felix.karaf.gshell.log.DisplayException"> |
Guillaume Nodet | 810fec9 | 2009-05-04 11:26:15 +0000 | [diff] [blame] | 52 | <property name="bundleContext" ref="bundleContext"/> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 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"> |
Guillaume Nodet | 810fec9 | 2009-05-04 11:26:15 +0000 | [diff] [blame] | 58 | <gshell:action class="org.apache.felix.karaf.gshell.log.GetLogLevel"> |
| 59 | <property name="bundleContext" ref="bundleContext"/> |
| 60 | </gshell:action> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 61 | </gshell:command> |
| 62 | <gshell:command name="log/set"> |
Guillaume Nodet | 810fec9 | 2009-05-04 11:26:15 +0000 | [diff] [blame] | 63 | <gshell:action class="org.apache.felix.karaf.gshell.log.SetLogLevel"> |
| 64 | <property name="bundleContext" ref="bundleContext"/> |
| 65 | </gshell:action> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 66 | </gshell:command> |
| 67 | |
| 68 | <gshell:alias name="ld" alias="log/d" /> |
| 69 | <gshell:alias name="lde" alias="log/de" /> |
| 70 | </gshell:command-bundle> |
| 71 | |
Gert Vanthienen | f54a839 | 2009-05-02 19:57:13 +0000 | [diff] [blame] | 72 | <bean id="vmLogAppender" class="org.apache.felix.karaf.gshell.log.VmLogAppender"> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 73 | <property name="events" ref="events" /> |
| 74 | </bean> |
| 75 | |
Gert Vanthienen | f54a839 | 2009-05-02 19:57:13 +0000 | [diff] [blame] | 76 | <bean id="events" class="org.apache.felix.karaf.gshell.log.LruList"> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 77 | <constructor-arg value="${size}" /> |
| 78 | </bean> |
| 79 | |
| 80 | <osgi:service ref="vmLogAppender" interface="org.ops4j.pax.logging.spi.PaxAppender"> |
| 81 | <osgi:service-properties> |
| 82 | <entry> |
| 83 | <key><util:constant static-field="org.ops4j.pax.logging.PaxLoggingService.APPENDER_NAME_PROPERTY"/></key> |
| 84 | <value>VmLogAppender</value> |
| 85 | </entry> |
| 86 | </osgi:service-properties> |
| 87 | </osgi:service> |
| 88 | |
Guillaume Nodet | b3f7480 | 2009-05-12 16:43:44 +0000 | [diff] [blame] | 89 | <osgix:cm-properties id="cmProps" persistent-id="org.apache.felix.karaf.log"> |
Guillaume Nodet | 05fac96 | 2009-04-27 10:01:58 +0000 | [diff] [blame] | 90 | <prop key="size">500</prop> |
| 91 | <prop key="pattern">%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n</prop> |
| 92 | </osgix:cm-properties> |
| 93 | |
| 94 | <ctx:property-placeholder properties-ref="cmProps" /> |
| 95 | |
Gert Vanthienen | f54a839 | 2009-05-02 19:57:13 +0000 | [diff] [blame] | 96 | </beans> |