jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r933197 - in /jackrabbit/trunk/jackrabbit-standalone/src/main: java/org/apache/jackrabbit/standalone/Main.java resources/logback-cli.xml
Date Mon, 12 Apr 2010 11:34:23 GMT
Author: jukka
Date: Mon Apr 12 11:34:23 2010
New Revision: 933197

URL: http://svn.apache.org/viewvc?rev=933197&view=rev
Log:
JCR-2457: Command line access to remote repositories

Add custom logging configuration for the CLI client mode

Added:
    jackrabbit/trunk/jackrabbit-standalone/src/main/resources/logback-cli.xml   (with props)
Modified:
    jackrabbit/trunk/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/Main.java

Modified: jackrabbit/trunk/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/Main.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/Main.java?rev=933197&r1=933196&r2=933197&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/Main.java
(original)
+++ jackrabbit/trunk/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/Main.java
Mon Apr 12 11:34:23 2010
@@ -117,13 +117,13 @@ public class Main {
         } else if (command.hasOption("license")) {
             copyToOutput("/META-INF/LICENSE.txt");
         } else if (command.hasOption("cli")) {
+            System.setProperty("logback.configurationFile", "logback-cli.xml");
+
             Context context = new ContextBase();
             String uri = command.getOptionValue("cli");
             Repository repository = JcrUtils.getRepository(uri);
-            Session session = repository.login();
             CommandHelper.setRepository(context, repository, uri);
-            CommandHelper.setSession(context, session);
-            CommandHelper.setCurrentNode(context, session.getRootNode());
+
             new JcrClient(context).runInteractive();
         } else {
             message("Welcome to Apache Jackrabbit!");

Added: jackrabbit/trunk/jackrabbit-standalone/src/main/resources/logback-cli.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-standalone/src/main/resources/logback-cli.xml?rev=933197&view=auto
==============================================================================
--- jackrabbit/trunk/jackrabbit-standalone/src/main/resources/logback-cli.xml (added)
+++ jackrabbit/trunk/jackrabbit-standalone/src/main/resources/logback-cli.xml Mon Apr 12 11:34:23
2010
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+  -->
+<configuration>
+
+  <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%level %msg%n</pattern>
+    </encoder>
+  </appender>
+
+  <root level="WARN">
+    <appender-ref ref="console"/>
+  </root>
+
+</configuration>

Propchange: jackrabbit/trunk/jackrabbit-standalone/src/main/resources/logback-cli.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message