Created
April 24, 2018 17:01
-
-
Save richm/cda9082c8f44b17df1283407f4e9245a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
python -c ' | |
import sys,yaml | |
with open("logging.yml") as file: | |
c = yaml.load(file) | |
for appender in ["file", "deprecation_log_file", "index_search_slow_log_file", "index_indexing_slow_log_file"]: | |
if f = c["appender"][appender]: | |
f = c["type"] = "io.openshift.log4jextras.appender.DailyRollingFileAppender" | |
f["maxBackupIndex"] = sys.argv[1] | |
f["datePattern"] = sys.argv[2] | |
f["append"] = True | |
with open("logging.new","w") as target: | |
yaml.dump(c, target) | |
' ${ES_LOGS_MAX_BACKUP} ${ES_LOGS_DATE_PATTERN} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment