DEV Community

Cover image for How to view server logs in real-time in VS Code

How to view server logs in real-time in VS Code

Rajesh Royal on March 11, 2024

Ever wondered how to view log files in real time without downloading them? I recently needed it, as I was tired of downloading the log files from t...
Collapse
 
rajeshkanaka profile image
Rajesh P

For using key to remote connection,
"log-tail.remote": {
"host": "remote-server",
"port": 22,
"username": "admin",
"privateKeyPath": "/Users/XXX/keys/keytouse.pem"
},

Collapse
 
idubi profile image
idubi

I use tail -f on the log.
usually ssh works to connect to it and watch.

nice plugin.

Collapse
 
ahadhi profile image
ahadhi

I am using username & keyfile [ppk] to connect remote server [sftp] in windows. And the key file is available at C:\mykeyfolder\my.ppk. Please provide configuration for keyfile.

Collapse
 
rajeshroyal profile image
Rajesh Royal

Unfortunately the plugin does not provide a option for this as of now. I will suggest you to check the plugin source code and see if you can modify it as per your need.

Collapse
 
ferretchen profile image
Dan

Thanks for bringing this extension to my attention. Is there a way to specify multiple remote servers?

Collapse
 
rajeshroyal profile image
Rajesh Royal

Yes, Instead of using the user setting you can add project level settings.json file and can listen to two servers in two vscode windows.