# Accessing Diagnostic Logs in Perspective

**URL:** <https://forum.inductiveautomation.com/t/accessing-diagnostic-logs-in-perspective/66954>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [November 27, 2022, 9:01pm UTC](https://forum.inductiveautomation.com/t/accessing-diagnostic-logs-in-perspective/66954 "2022-11-27T21:01:47Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![tyler.bennett](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@tyler.bennett](https://forum.inductiveautomation.com/u/tyler.bennett)\
**Post date:** [August 4, 2025, 2:45am UTC](https://forum.inductiveautomation.com/t/accessing-diagnostic-logs-in-perspective/66954/6 "2025-08-04T02:45:44Z")

</div>

1. It is possible to display the gateway log viewer (https://[ipaddress]/web/status/diag.logviewer) through a Perspective `Inline Frame` component. In my implementation I had `Config > Security > General > Status Page Permissions` left blank (public security level). I am not exactly sure what obstacles a more restricted security setup might introduce.
2. It appears very possible to retrieve logger information (as suggested by @paul-griffith) and potentially build your own log viewer in Perspective . Here is a starting point I derived from [code provided](https://forum.inductiveautomation.com/t/scripting-to-read-gateway-logs/64402/7#code-for-prosperity-1) by @kgamble (and left here for my own future reference).

```python
from com.inductiveautomation.ignition.gateway import IgnitionGateway
from com.inductiveautomation.ignition.common.logging import LogQueryConfig
	
loggingManager = IgnitionGateway.get().getLoggingManager()
	
logQueryConfigBuilder = LogQueryConfig.newBuilder()
# May add filters to LogQueryConfigBuilder object

logQueryFilter = logQueryConfigBuilder.build()
# May add filters to LogQueryFilter object

logQueryFilter.setLimit(10)
	
logResults = loggingManager.queryLogEvents(logQueryFilter)
	
logEvents = logResults.getEvents()

events = []
for event in logEvents:
	events.append({
		 'exception' : event.getException()
		,'level' : event.getLevel()
		,'loggerName': event.getLoggerName()
		,'marker' : event.getMarker()
		,'message' : event.getMessage()
		,'properties': event.getProperties()
		,'source' : event.getSourceLocation()
		,'timestamp' : system.date.fromMillis(event.getTimestamp())
	})

```

There are lots of filtering options than can be applied using methods available on the [`LogQueryConfigBuilder`](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.48/com/inductiveautomation/ignition/common/logging/LogQueryConfig.LogQueryConfigBuilder.html) and [`LogQueryConfig`](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.48/com/inductiveautomation/ignition/common/logging/LogQueryConfig.html) class objects.

Screenshot showing gateway log viewer exposed in Perspective Inline Frame component.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/2/228eeb509c3a33294bb20162bdbbe99a27671c1b.png)

---

_[View the full topic](https://forum.inductiveautomation.com/t/accessing-diagnostic-logs-in-perspective/66954)._
