added support for username variable for logging
This commit is contained in:
@@ -21,7 +21,7 @@ if ($Port -eq 0) {
|
||||
|
||||
# --- Start transcript logging ---
|
||||
try {
|
||||
$logDir = Join-Path $config.LogPath $env:USERNAME
|
||||
$logDir = [System.Environment]::ExpandEnvironmentVariables($config.LogPath)
|
||||
New-Item -ItemType Directory -Path $logDir -Force -ErrorAction SilentlyContinue | Out-Null
|
||||
Start-Transcript -Path (Join-Path $logDir 'OBSReplayBuffer-Save.log') -Append -ErrorAction Stop
|
||||
} catch {
|
||||
|
||||
@@ -15,7 +15,7 @@ Add-Type -AssemblyName System.Drawing
|
||||
# --- Start transcript logging ---
|
||||
try {
|
||||
$config = Import-PowerShellDataFile -Path (Join-Path $PSScriptRoot '..\config.psd1')
|
||||
$logDir = Join-Path $config.LogPath $env:USERNAME
|
||||
$logDir = [System.Environment]::ExpandEnvironmentVariables($config.LogPath)
|
||||
New-Item -ItemType Directory -Path $logDir -Force -ErrorAction SilentlyContinue | Out-Null
|
||||
Start-Transcript -Path (Join-Path $logDir 'OBSReplayBuffer-Tray.log') -Append -ErrorAction Stop
|
||||
} catch {
|
||||
|
||||
@@ -17,7 +17,7 @@ $config = Import-PowerShellDataFile -Path $configPath
|
||||
|
||||
# --- Start transcript logging ---
|
||||
try {
|
||||
$logDir = Join-Path $config.LogPath $env:USERNAME
|
||||
$logDir = [System.Environment]::ExpandEnvironmentVariables($config.LogPath)
|
||||
New-Item -ItemType Directory -Path $logDir -Force -ErrorAction SilentlyContinue | Out-Null
|
||||
Start-Transcript -Path (Join-Path $logDir 'OBSReplayBuffer.log') -Append -ErrorAction Stop
|
||||
} catch {
|
||||
@@ -69,6 +69,7 @@ Write-Host "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') [INFO] Detected resolution
|
||||
$obsConfigRoot = "$env:APPDATA\obs-studio"
|
||||
$sourceConfig = Join-Path $PSScriptRoot '..\obs-config'
|
||||
|
||||
New-Item -ItemType Directory -Path $obsConfigRoot -Force | Out-Null
|
||||
Copy-Item -Path "$sourceConfig\global.ini" -Destination "$obsConfigRoot\global.ini" -Force
|
||||
|
||||
$wsConfigDir = "$obsConfigRoot\plugin_config\obs-websocket"
|
||||
|
||||
Reference in New Issue
Block a user