Viewing logs in VSCode

Hi Team,

I’d discovered a good post on how to view the logs with VSCode, which will update in realtime:

I like the concept as I already have VSCode open for other programming. But I can’t get this to work. I’ve followed the settings.json suggestion but when I try to open one of the log files I only get a return of “no matching file found.” An example of my pattern entry is:

"pattern": "\\\\XXX.XXX.XXX.XXX\\openHAB-logs\\openhab.log"

Where I insert the local address of the openHAB server. I have the “openHAB-logs” defined properly within my smb.conf file. Any suggestions?

Interesting thread, you’re pointing to.

This works for me:

            "title": "openhab.log",
            "pattern": "/run/user/1000/gvfs/smb-share:server=gehirn.local,share=openhab-logs/openhab.log"

It requires that you have opened the samba share with gvfs (e.g. Nautilus).

@usambara, thank you for the reply! I’m a bit less adept on the linux side of the operation; can you decode your pattern for me? I’m remoting in to my openHAB server, it’s not the local machine and with the server’s address it’s still not functioning

not sure if I can, but at least I’ll try:
I’m using the file manager nautilus (default with Gnome at debian linux) to connect to my samba shares on the remote servers.
grafik

This is creating a directory you can use to access the remote share. This is located under /run/user/<your user id>/gvfs/. This directory is created with the name “smb-share:server=gehirn.local,share=openhab-logs”.
I think this is comparable to creating a remote drive (e.g. Z:) for your share at windows.