Last active
August 4, 2022 16:42
-
-
Save JLChnToZ/26200b10921155f065fbf390f45c97ed to your computer and use it in GitHub Desktop.
Live view VRChat runtime log on console legally (mod-free)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Host.UI.RawUI.WindowTitle = 'VRChat Log' | |
$Host.UI.RawUI.BackgroundColor = 'Black' | |
$Host.PrivateData.VerboseForegroundColor = 'White' | |
Clear-Host | |
Get-Content -Tail $Host.UI.RawUI.BufferSize.Height -Wait -Encoding UTF8 (Get-ChildItem -Path "$($Env:LocalAppData)Low\VRChat\VRChat" -Filter 'output_log_*.txt' | Sort-Object LastWriteTime -Descending | Select-Object -First 1 | ForEach-Object {$_.FullName}) | Where-Object {$_.Trim() -ne ''} | ForEach-Object { | |
if ($_ -match '^\d{4}\.\d{2}\.\d{2}\s\d{2}:\d{2}:\d{2}\sError') { | |
$Host.UI.RawUI.ForegroundColor = $Host.PrivateData.ErrorForegroundColor | |
$Host.UI.RawUI.BackgroundColor = $Host.PrivateData.ErrorBackgroundColor | |
} elseif ($_ -match '^\d{4}\.\d{2}\.\d{2}\s\d{2}:\d{2}:\d{2}\sException') { | |
$Host.UI.RawUI.ForegroundColor = $Host.PrivateData.ErrorForegroundColor | |
$Host.UI.RawUI.BackgroundColor = $Host.PrivateData.ErrorBackgroundColor | |
} elseif ($_ -match '^\d{4}\.\d{2}\.\d{2}\s\d{2}:\d{2}:\d{2}\sWarning') { | |
$Host.UI.RawUI.ForegroundColor = $Host.PrivateData.WarningForegroundColor | |
$Host.UI.RawUI.BackgroundColor = $Host.PrivateData.WarningBackgroundColor | |
} elseif ($_ -match '^\d{4}\.\d{2}\.\d{2}\s\d{2}:\d{2}:\d{2}\sLog') { | |
$Host.UI.RawUI.ForegroundColor = $Host.PrivateData.VerboseForegroundColor | |
$Host.UI.RawUI.BackgroundColor = $Host.PrivateData.VerboseBackgroundColor | |
} | |
$_ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment