Jump to content

Recommended Posts

Hey guys, I threw together a batch script a few days ago that I've been using CONSTANTLY, so I figured I'd share it, as it's saved me so many annoying clicks.

It's as simple one-liner that opens the Client and Server logs in Windows Terminal, so you'll need that to use this. It comes with Windows 11 by default as far as I know, and Windows 10 users can install it from the Microsoft Store for free.

Here's the code, it's pretty simple. It tells wt (Windows Terminal) to make a couple of tabs, color them red and blue, name them, and make them tail the client and master_server logs. Nothing much to it, but pretty useful for me, and I hope to you too!

cmd /c "wt --title "Server Log" --tabColor #AA0000 PowerShell Get-Content %homepath%/Documents/Klei/DoNotStarveTogether/master_server_log.txt -wait; new-tab --title "Client Log" --tabColor #0000AA PowerShell Get-Content %homepath%/Documents/Klei/DoNotStarveTogether/client_log.txt -wait"

 

image.thumb.png.d884fc8010356c8c29565ecf77563ff2.png

Here's a download for it if you'd like. It uses the same exact code from above, just pasted inside a batch file.

open_logs.bat

Edited by TheSkylarr
  • Thanks 1
  • Developer

I have used BareTail for log file following, basically since I started modding DST, its capable of remembering the open log files, so you don't need to constantly re-open them, and its capable of doing line highlighting based on keywords, and its free.

  • Like 3
  • Thanks 1
4 minutes ago, zarklord_klei said:

I have used BareTail for log file following, basically since I started modding DST, its capable of remembering the open log files, so you don't need to constantly re-open them, and its capable of doing line highlighting based on keywords, and its free.

Never heard of it, but from the screenshots that highlighting could be super useful! I'll give it a try later today.

On windows you can also use WSL Ubuntu to provide the bash `tail -f` command.

You can also use a Visual Studio Code (vscode) extension "Log Viewer", with settings.json configured for the workspace like so:

{
  "logViewer.watch": [
    "master_server_log.txt",
    "client_log.txt"
  ]
}

 

13 hours ago, RoastedCarrots said:

On windows you can also use WSL Ubuntu to provide the bash `tail -f` command.

You can also use a Visual Studio Code (vscode) extension "Log Viewer", with settings.json configured for the workspace like so:

{
  "logViewer.watch": [
    "master_server_log.txt",
    "client_log.txt"
  ]
}

 

Better suggestion than mine honestly, definitely makes organization a bit easier!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...