openmeetings-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From solo...@apache.org
Subject [openmeetings] branch 4.0.x updated: no jira: logging is improved
Date Fri, 11 May 2018 03:28:21 GMT
This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch 4.0.x
in repository https://gitbox.apache.org/repos/asf/openmeetings.git


The following commit(s) were added to refs/heads/4.0.x by this push:
     new 8d1b544  no jira: logging is improved
8d1b544 is described below

commit 8d1b5447caa9c15d764d4b896b11ed3d0611bcbb
Author: Maxim Solodovnik <solomax666@gmail.com>
AuthorDate: Fri May 11 10:28:12 2018 +0700

    no jira: logging is improved
---
 .../org/apache/openmeetings/web/room/sidebar/UploadDialog.java     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/UploadDialog.java
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/UploadDialog.java
index 3d54349..f176519 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/UploadDialog.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/UploadDialog.java
@@ -19,6 +19,7 @@
 package org.apache.openmeetings.web.room.sidebar;
 
 import static org.apache.openmeetings.util.OpenmeetingsVariables.getMaxUploadSize;
+import static org.apache.openmeetings.util.OpenmeetingsVariables.getWebAppRootKey;
 import static org.apache.openmeetings.web.app.Application.getBean;
 import static org.apache.openmeetings.web.app.WebSession.getUserId;
 
@@ -53,6 +54,8 @@ import org.apache.wicket.model.Model;
 import org.apache.wicket.request.resource.JavaScriptResourceReference;
 import org.apache.wicket.util.lang.Bytes;
 import org.apache.wicket.util.string.Strings;
+import org.red5.logging.Red5LoggerFactory;
+import org.slf4j.Logger;
 
 import com.googlecode.wicket.jquery.core.Options;
 import com.googlecode.wicket.jquery.ui.widget.dialog.AbstractFormDialog;
@@ -61,6 +64,7 @@ import com.googlecode.wicket.kendo.ui.panel.KendoFeedbackPanel;
 
 public class UploadDialog extends AbstractFormDialog<String> {
 	private static final long serialVersionUID = 1L;
+	private static final Logger log = Red5LoggerFactory.getLogger(UploadDialog.class, getWebAppRootKey());
 	private final KendoFeedbackPanel feedback = new KendoFeedbackPanel("feedback", new Options("button",
true));
 	private final Form<String> form;
 	private DialogButton upload;
@@ -211,7 +215,8 @@ public class UploadDialog extends AbstractFormDialog<String> {
 						}
 					}
 				} catch (Exception e) {
-					form.error(e.getMessage());
+					log.error("Unexpected error while processing uploaded file", e);
+					form.error(e.getMessage() == null ? "Unexpected error" : e.getMessage());
 				} finally {
 					fu.closeStreams();
 					fu.delete();

-- 
To stop receiving notification emails like this one, please contact
solomax@apache.org.

Mime
View raw message