You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by bz...@apache.org on 2016/01/16 11:50:19 UTC

incubator-zeppelin git commit: fix logging to informative one

Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master 27163cbca -> 282cf271a


fix logging to informative one

### What is this PR for?
Improving logging information on error

### What type of PR is it?
Fix/Improvement

### Todos
* [x] - fix logging

### Is there a relevant Jira issue?
May not require issue

### How should this be tested?
Can be tested with any error for storage initialization
For example:
1. in `conf/zeppelin-env.sh` add the following line
    ```
    export ZEPPELIN_NOTEBOOK_STORAGE="org.apache.zeppelin.notebook.repo.VFSNotebookRepo,org.apache.zeppelin.notebook.repo.DummyNotebookRepo"
    ```
2. Start Zeppelin
3. Previously you would see one line warning, now you would see more detailed trace-back as well.

### Screenshots (if appropriate)
Before:
```
Failed to initialize com.nflabs.zeppelinhub.notebook.repo.DummyNotebookRepo notebook storage class java.lang.reflect.InvocationTargetException
```
After:
```
WARN [2016-01-13 22:43:05,557] ({main} NotebookRepoSync.java[<init>]:81) - Failed to initialize com.nflabs.zeppelinhub.notebook.repo.DummyNotebookRepo notebook storage class
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
```
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Khalid Huseynov <kh...@nflabs.com>

Closes #634 from khalidhuseynov/fix-logging and squashes the following commits:

dd65555 [Khalid Huseynov] fix logging to informative one


Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/282cf271
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/282cf271
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/282cf271

Branch: refs/heads/master
Commit: 282cf271a529e03e444fd8aa67e42d73342a5185
Parents: 27163cb
Author: Khalid Huseynov <kh...@nflabs.com>
Authored: Wed Jan 13 22:52:06 2016 +0900
Committer: Alexander Bezzubov <bz...@apache.org>
Committed: Sat Jan 16 19:50:02 2016 +0900

----------------------------------------------------------------------
 .../java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/282cf271/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java
index caab185..55cdac2 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/NotebookRepoSync.java
@@ -78,7 +78,7 @@ public class NotebookRepoSync implements NotebookRepo {
       } catch (ClassNotFoundException | NoSuchMethodException | SecurityException |
           InstantiationException | IllegalAccessException | IllegalArgumentException |
           InvocationTargetException e) {
-        LOG.warn("Failed to initialize {} notebook storage class {}", storageClassNames[i], e);
+        LOG.warn("Failed to initialize {} notebook storage class", storageClassNames[i], e);
       }
     }
     // couldn't initialize any storage, use default