ConsoleLogger class

ConsoleLogger class

Writes log messages to the console.

The ConsoleLogger type exposes the following members:

Constructors

Constructor Description
init

Methods

Method Description
error Writes an error message to the console.
error_file
error_string
trace Writes a trace message to the console.
trace_file
trace_string
warning Writes a warning message to the console.
warning_file
warning_string

Example

from groupdocs.viewer import Viewer, ViewerSettings
from groupdocs.viewer.logging import ConsoleLogger
from groupdocs.viewer.options import HtmlViewOptions

viewer_settings = ViewerSettings(logger=ConsoleLogger())
with Viewer("./sample.docx", settings=viewer_settings) as viewer:
    html_options = HtmlViewOptions.for_embedded_resources("output/page_{0}.html")
    viewer.view(html_options)

See Also