ps/Modules/Alkami.PowerShell.Configuration/Public/Get-LogPathsForOrbApplication.ps1

27 lines
795 B
PowerShell
Raw Permalink Normal View History

2023-05-30 22:51:22 -07:00
Function Get-LogPathsForOrbApplication {
<#
.SYNOPSIS
Gets the paths where a given ORB application saves its log files
.PARAMETER AppName
Name of the ORB Application to get the log file paths for
#>
[CmdletBinding()]
Param(
[Parameter(Mandatory = $true)]
[Alias("Name")]
[string]$AppName
)
process {
$log4netConfigPath = (Join-Path (Join-Path (Get-OrbPath) $appName) "log4net.config");
if (!(Test-Path $log4netConfigPath)) {
throw "Could not find the path at $log4netConfigPath";
}
$config = [Xml](Get-Content $log4netConfigPath);
## Use the native powershell capability to just do the array to list thing automatically
return $config.configuration.log4net.appender.file.value;
}
}