mirror of https://github.com/winsw/winsw
Fix yaml `logPath` case
parent
6cf303c1d3
commit
bbf09132e7
|
@ -96,14 +96,14 @@ depend:
|
|||
|
||||
### log
|
||||
|
||||
Optionally set a different logging directory with `logpath` and startup `mode`: append (default), reset (clear log), ignore, roll (move to `\*.old`).
|
||||
Optionally set a different logging directory with `logPath` and startup `mode`: append (default), reset (clear log), ignore, roll (move to `\*.old`).
|
||||
|
||||
User can specify all log configurations as a single YAML dictionary
|
||||
|
||||
```yaml
|
||||
log:
|
||||
mode: roll-by-size
|
||||
logpath: '%BASE%\log'
|
||||
logPath: '%BASE%\log'
|
||||
sizeThreshold: 10240
|
||||
keepFiles: 8
|
||||
```
|
||||
|
|
|
@ -38,7 +38,7 @@ waitHint: 15 sec
|
|||
sleepTime: 1 sec
|
||||
#interactive: true
|
||||
log:
|
||||
# logpath: '%BASE%\logs'
|
||||
# logPath: '%BASE%\logs'
|
||||
mode: append
|
||||
#env:
|
||||
# -
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace winswTests
|
|||
private IServiceConfig _extendedServiceDescriptor;
|
||||
|
||||
private const string ExpectedWorkingDirectory = @"Z:\Path\SubPath";
|
||||
private const string ExpectedLogDirectory = @"c:\logs";
|
||||
private const string Username = "User";
|
||||
private const string Password = "Password";
|
||||
private const string Domain = "Domain";
|
||||
|
@ -29,7 +30,7 @@ executable: node.exe
|
|||
arguments: My Arguments
|
||||
log:
|
||||
mode: roll
|
||||
logpath: c:\logs
|
||||
logPath: {ExpectedLogDirectory}
|
||||
serviceAccount:
|
||||
domain: {Domain}
|
||||
user: {Username}
|
||||
|
@ -82,6 +83,13 @@ startMode: manual";
|
|||
Assert.That(this._extendedServiceDescriptor.WorkingDirectory, Is.EqualTo(ExpectedWorkingDirectory));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void VerifyLogPath()
|
||||
{
|
||||
Assert.That(this._extendedServiceDescriptor.Log.Directory, Is.EqualTo(ExpectedLogDirectory));
|
||||
Assert.That(this._extendedServiceDescriptor.LogDirectory, Is.EqualTo(ExpectedLogDirectory));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void VerifyServiceLogonRight()
|
||||
{
|
||||
|
@ -265,7 +273,7 @@ name: Service
|
|||
description: The Service.
|
||||
executable: node.exe
|
||||
log:
|
||||
logpath: 'c:\\'
|
||||
logPath: 'c:\\'
|
||||
mode: roll-by-size
|
||||
sizeThreshold: 112
|
||||
keepFiles: 113";
|
||||
|
@ -289,7 +297,7 @@ name: Service
|
|||
description: The Service.
|
||||
executable: node.exe
|
||||
log:
|
||||
logpath: c:\\
|
||||
logPath: c:\\
|
||||
mode: roll-by-time
|
||||
period: 7
|
||||
pattern: log pattern";
|
||||
|
@ -313,7 +321,7 @@ name: Service
|
|||
description: The Service.
|
||||
executable: node.exe
|
||||
log:
|
||||
logpath: c:\\
|
||||
logPath: c:\\
|
||||
mode: roll-by-size-time
|
||||
sizeThreshold: 10240
|
||||
pattern: yyyy-MM-dd
|
||||
|
|
Loading…
Reference in New Issue