Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extra files to logrotate need their own block due to different file e…
…xtensions
- Loading branch information
tpetr
committed
Feb 5, 2016
1 parent
5ff15b9
commit 3f3e535
Showing
5 changed files
with
65 additions
and
26 deletions.
There are no files selected for viewing
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
36 changes: 36 additions & 0 deletions
36
...a/com/hubspot/singularity/executor/config/SingularityExecutorLogrotateAdditionalFile.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.hubspot.singularity.executor.config; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.google.common.base.Optional; | ||
|
||
public class SingularityExecutorLogrotateAdditionalFile { | ||
private final String filename; | ||
private final Optional<String> extension; | ||
private final Optional<String> dateformat; | ||
|
||
public static SingularityExecutorLogrotateAdditionalFile fromString(String value) { | ||
return new SingularityExecutorLogrotateAdditionalFile(value, Optional.<String>absent(), Optional.<String>absent()); | ||
} | ||
|
||
@JsonCreator | ||
public SingularityExecutorLogrotateAdditionalFile(@JsonProperty("filename") String filename, | ||
@JsonProperty("extension") Optional<String> extension, | ||
@JsonProperty("dateformat") Optional<String> dateformat) { | ||
this.filename = filename; | ||
this.extension = extension; | ||
this.dateformat = dateformat; | ||
} | ||
|
||
public String getFilename() { | ||
return filename; | ||
} | ||
|
||
public Optional<String> getExtension() { | ||
return extension; | ||
} | ||
|
||
public Optional<String> getDateformat() { | ||
return dateformat; | ||
} | ||
} |
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
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
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