# LogViewer

Intended audience: all

- LogViewer

## Overview

LogViewer is an application for displaying logs pushed by the devices to the Tango logging system. You can fetch logs from different Tango devices and filter them by several properties to find what you need.

LogViewer 2.0.1 main window

1 - Menu bar
2 - Filter settings
3 - Clear button - clears the logs window
4 - Pause button
5 - Device tree
6 - Logs
7 - History of actions

### Tango Logging

Tango provides a logging service for devices. It is configured by several device properties, and support sending logs to various targets, such as files, log consumer devices or the console. For more information you can check out more details about logging service.

## Adding devices

To add logs from device to the viewer you need to right click on the device in the device tree and click add. Then you need to set which level logs from that device should be visible. You can do this with Set Logging Level options in the device context menu.

Add logs from device

Alternatively, you can add device with log level already set with Add/Set Logging Level context menu option.

Add and set logging level

### Add colocated devices

The Add Colocated option adds all devices, running on the same device server instance, as logging sources. For example, if you have a `TangoTest/test` instance with `sys/tg_test/1` and `sys/tg_test/2` devices, choosing Add Colocated on any of these devices will add both of them. The same applies for Remove Colocated and Set Logging Level (colocated) options.

## Actions menu

The actions menu provides access to some useful functions:

Actions menu

- Refresh Device Tree - refresh devices

- Logging Source List - list all added devices in the history window

- Remove All Logging Source - remove all devices from source list

- Clear history - clear history window

## Loading logs from files

With the File > Load file menu option you can load a log file generated by the devices which logging target is set to file. This allows you to use the LogViewer features to filter and search through the logs offline. The log file format is XML.