fixed both LocalFileConfig and its test
This commit is contained in:
parent
276da34b6d
commit
ca759d1bd2
|
|
@ -32,6 +32,8 @@ public class LocalFileConfig
|
|||
return maxLogItemsLimit;
|
||||
}
|
||||
|
||||
@Config("presto-logs.http-request-log.location")
|
||||
@ConfigDescription("Directory or file where http request logs are written")
|
||||
public LocalFileConfig setHttpRequestLogLocation(String httpRequestLogLocation)
|
||||
{
|
||||
this.httpRequestLogLocation = httpRequestLogLocation;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public class TestLocalFileConfig
|
|||
public void testDefaults()
|
||||
{
|
||||
ConfigAssertions.assertRecordedDefaults(ConfigAssertions.recordDefaults(LocalFileConfig.class)
|
||||
.setHttpRequestLogFileNamePattern(null));
|
||||
.setHttpRequestLogFileNamePattern(null).setHttpRequestLogLocation("var/log/http-request.log"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -33,11 +33,14 @@ public class TestLocalFileConfig
|
|||
{
|
||||
Map<String, String> properties = new ImmutableMap.Builder<String, String>()
|
||||
.put("presto-logs.http-request-log.pattern", "bar")
|
||||
.put("presto-logs.http-request-log.location", "jar")
|
||||
.build();
|
||||
|
||||
LocalFileConfig expected = new LocalFileConfig()
|
||||
.setHttpRequestLogFileNamePattern("bar");
|
||||
|
||||
expected.setHttpRequestLogLocation("jar");
|
||||
|
||||
ConfigAssertions.assertFullMapping(properties, expected);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue