# Programmatically get vision client logs

**URL:** <https://forum.inductiveautomation.com/t/programmatically-get-vision-client-logs/97638>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [October 22, 2024, 8:43pm UTC](https://forum.inductiveautomation.com/t/programmatically-get-vision-client-logs/97638 "2024-10-22T20:43:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chandler](https://avatars.discourse-cdn.com/v4/letter/c/e9a140/32.png) [@chandler](https://forum.inductiveautomation.com/u/chandler)\
**Post date:** [October 22, 2024, 8:43pm UTC](https://forum.inductiveautomation.com/t/programmatically-get-vision-client-logs/97638/1 "2024-10-22T20:43:16Z")

</div>

I would like to get the logs (diagnostic window \> console tab) from my vision client in a script. I have played around with the `VisionClientContext` and its `getLoggingManager` method, but haven't found anything useful yet. Does anyone know if this is possible?

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [October 23, 2024, 4:59pm UTC](https://forum.inductiveautomation.com/t/programmatically-get-vision-client-logs/97638/2 "2024-10-23T16:59:25Z")

</div>

I've done this sort of thing before here:  
[Output Console Buffer Problems](https://forum.inductiveautomation.com/t/output-console-buffer-problems/9610/3)

For your use case, the code boils down to this:

```python
from com.inductiveautomation.ignition.client.util.gui import OutputConsole

# Get an instance of the console
# Find the scroll pane,
# ...and return the text property from the internal JTextField
def getConsoleText():
	console = OutputConsole.getInstance()
	for component in console.components:
		if hasattr(component, 'viewport'):
			return component.viewport.view.text

# Get the console text, and do something with it
consoleText = getConsoleText()

```

---

<div class="post-metadata">

**Author:** ![chandler](https://avatars.discourse-cdn.com/v4/letter/c/e9a140/32.png) [@chandler](https://forum.inductiveautomation.com/u/chandler)\
**Post date:** [October 23, 2024, 8:37pm UTC](https://forum.inductiveautomation.com/t/programmatically-get-vision-client-logs/97638/3 "2024-10-23T20:37:30Z")

</div>

This is exactly what I was looking for. Thank you.
