Free Support Forum - groupdocs.com

No logging - can you add some?


#1

Hi,


I noticed that there is no logging (debug) in your tool. All the exceptions are caught and hidden so there is no way to find out what is going on. Please extend the API so we can enable some debug logging to investigate the issues.S LF4j is preferred since you already reference it in your library.

Thank you,
Mariusz

#2
Hello Mariusz,

Thank you for this suggestion. Please, provide few samples of current issues and few samples of how you think it should look like. We will review it and think about realization in further releases.


#3

The issues you have found earlier (filed as VIEWERJAVA-550) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by groupdocs.notifier.

#4

Sample is attached to http://groupdocs.com/Community/forums/thread/3578/how-to-implement-a-custom-document-handler.aspx


There is an issue caught and just the ‘success: false’ message is returned to the UI. I had to get the stack trace from a debug mode in eclipse. Exceptions like that should be printed out at least so I can easily copy it and send to you for investigation.

Sample: ViewerHandler class, viewDocumentHandler method:

catch (Exception ex) {
return getErrorMessage(ex.getMessage());
}

getErrorMessage method just returns a JSON response and doesn’t print the exception anywhere. Because of that there is no way to find out why the document failed to load. It could be password protection, or just not supported format.

Thanks,
Mariusz

#5

Hi,


can you describe how that issue was fixed/implemented? Does it concerns logging or the protected document handling?

Thank you,
Mariusz

#6
Hi Mariusz,

Thank you for this suggestion and provided example. Our developers already are informed about unsupported and password protected document handling issue. I think they will improve this in general as you suggest here. We will work on these improvements in further releases. When they will be published you’ll be notified.


#7
Hello Mariusz,

Now GroupDocs.Viewer for Java library methods expose exceptions that can be caught. You can view here methods that were changed:
https://github.com/groupdocs/groupdocs-viewer-java-dropwizard-sample/commit/b492d88a55d1a9bfaca6834262a95790cea9cf39?diff=split