XtremeDocumentStudio .NET
Next-generation multi-format document-processing component suite for .NET developers
Compatibility
Visual Studio 2010/2012/2013/2015

How to enable logging on the HTML5 Document Viewer control

Learn how to enable logger.
By Shivaranjini & Pradeep

In order to help investigate document loading and server connectivity issues we have introduced logging for the operations of the HTML5 Document Viewer. The Document Viewer emits these log messages to the console window of the client browser only when logging is enabled. Logging can be enabled on the client-side based on need.

To simplify the process of logging we have introduced a class called logger. Currently it supports logging at “INFO” and “ERROR” levels and it writes log messages on the console window of the browser.

To enable logging at “INFO” level, set the following property to true:

    logger.infoLogsEnabled  = true;
To enable logging at “ERROR” level, set the following property to true:
    logger.errorLogsEnabled  = true;
This can be enabled while initializing DocumentViewer control
    gnostice.logger.infoLogsEnabled  = true;
    var documentViewer = new gnostice.DocumentViewer('doc-viewer-id');

or it can also be done in console window of the browser. With this approach the user need not have to change their web application code.

The following screenshot shows how logging can be enabled from the browser console window and what the log messages look like.

Related articles:

---o0O0o---

Our .NET Developer Tools
XtremeDocumentStudio .NET

Multi-format document-processing component suite for .NET developers.

PDFOne .NET

A .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications.

Our Delphi/C++Builder developer tools
XtremeDocumentStudio Delphi

Multi-format document-processing component suite for Delphi/C++Builder developers, covering both VCL and FireMonkey platforms.

eDocEngine VCL

A Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools.

PDFtoolkit VCL

A Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents.

Our Java developer tools
XtremeDocumentStudio (for Java)

Multi-format document-processing component suite for Java developers.

PDFOne (for Java)

A Java PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java applications.

Our Platform-Agnostic Cloud and On-Premises APIs
StarDocs

Cloud-hosted and On-Premises REST-based document-processing and document-viewing APIs

Privacy | Legal | Feedback | Newsletter | Blog | Resellers © 2002-2017 Gnostice Information Technologies Private Limited. All rights reserved.