Allow configuring the search log level.

This commit is contained in:
Tom Page
2020-07-15 11:08:42 +01:00
parent 01a60ff74a
commit 5a47f748d3
10 changed files with 2223 additions and 6 deletions

View File

@@ -102,6 +102,19 @@ module.exports = class extends Generator {
], ],
default: 'DB_ID' default: 'DB_ID'
}, },
{
type: 'list',
name: 'searchLogLevel',
message: 'What log level do you want to use for search?',
choices: [
"TRACE",
"DEBUG",
"INFO",
"WARN",
"ERROR"
],
default: 'WARN'
},
{ {
whenFunction: response => response.alfrescoVersion == 'enterprise', whenFunction: response => response.alfrescoVersion == 'enterprise',
type: 'confirm', type: 'confirm',
@@ -214,7 +227,8 @@ module.exports = class extends Generator {
zeppelin: (this.props.zeppelin ? "true" : "false"), zeppelin: (this.props.zeppelin ? "true" : "false"),
sharding: (this.props.sharding ? "true" : "false"), sharding: (this.props.sharding ? "true" : "false"),
shardingMethod: (this.props.shardingMethod), shardingMethod: (this.props.shardingMethod),
gzip: (this.props.gzip ? "true" : "false") gzip: (this.props.gzip ? "true" : "false"),
searchLogLevel: this.props.searchLogLevel
} }
); );

View File

@@ -50,6 +50,7 @@ services:
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication) { %> KEYSTORE_TYPE: JCEKS <% } %> <% if (replication) { %>
ENABLE_MASTER: "true" ENABLE_MASTER: "true"
ENABLE_SLAVE: "false" <% } %> ENABLE_SLAVE: "false" <% } %>
SEARCH_LOG_LEVEL: <%=searchLogLevel%>
mem_limit: 1200m mem_limit: 1200m
environment: environment:
#Solr needs to know how to register itself with Alfresco #Solr needs to know how to register itself with Alfresco
@@ -183,4 +184,4 @@ services:
- alfresco - alfresco
- share - share
- solr6 - solr6
- content-app - content-app

View File

@@ -69,6 +69,7 @@ services:
SHARD_KEY: "shard:shardId" <% } %> <% if (shardingMethod == 'EXPLICIT_ID' || shardingMethod == 'EXPLICIT_ID_FALLBACK_LRIS') { %> SHARD_KEY: "shard:shardId" <% } %> <% if (shardingMethod == 'EXPLICIT_ID' || shardingMethod == 'EXPLICIT_ID_FALLBACK_LRIS') { %>
SHARD_KEY: "shard:shardId" <% } %> SHARD_KEY: "shard:shardId" <% } %>
SHARDING_METHOD: <%=shardingMethod%> <% } %> SHARDING_METHOD: <%=shardingMethod%> <% } %>
SEARCH_LOG_LEVEL: <%=searchLogLevel%>
mem_limit: 1200m mem_limit: 1200m
environment: environment:
#Solr needs to know how to register itself with Alfresco #Solr needs to know how to register itself with Alfresco
@@ -331,4 +332,4 @@ volumes:
shared-file-store-volume: shared-file-store-volume:
driver_opts: driver_opts:
type: tmpfs type: tmpfs
device: tmpfs device: tmpfs

View File

@@ -68,6 +68,7 @@ services:
ENABLE_MASTER: "true" ENABLE_MASTER: "true"
ENABLE_SLAVE: "false" <% } %> ENABLE_SLAVE: "false" <% } %>
COMPRESS_CONTENT: "<%=gzip%>" COMPRESS_CONTENT: "<%=gzip%>"
SEARCH_LOG_LEVEL: <%=searchLogLevel%>
mem_limit: 1200m mem_limit: 1200m
environment: environment:
#Solr needs to know how to register itself with Alfresco #Solr needs to know how to register itself with Alfresco
@@ -242,4 +243,4 @@ services:
- alfresco - alfresco
- share - share
- solr6 - solr6
- content-app - content-app

View File

@@ -72,6 +72,7 @@ services:
SHARD_KEY: "shard:shardId" <% } %> SHARD_KEY: "shard:shardId" <% } %>
SHARDING_METHOD: <%=shardingMethod%> <% } %> SHARDING_METHOD: <%=shardingMethod%> <% } %>
COMPRESS_CONTENT: "<%=gzip%>" COMPRESS_CONTENT: "<%=gzip%>"
SEARCH_LOG_LEVEL: <%=searchLogLevel%>
mem_limit: 1200m mem_limit: 1200m
environment: environment:
#Solr needs to know how to register itself with Alfresco #Solr needs to know how to register itself with Alfresco

View File

@@ -152,4 +152,12 @@ fi
RUN mkdir ${DIST_DIR}/keystore \ RUN mkdir ${DIST_DIR}/keystore \
&& chown -R solr:solr ${DIST_DIR}/keystore && chown -R solr:solr ${DIST_DIR}/keystore
# Set the search log level if requested.
ARG SEARCH_LOG_LEVEL
ENV SEARCH_LOG_LEVEL $SEARCH_LOG_LEVEL
RUN if [ "$SEARCH_LOG_LEVEL" ] ; then \
sed -i '/^bash.*/i sed -i "'"s/log4j.rootLogger=WARN, file, CONSOLE/log4j.rootLogger=${SEARCH_LOG_LEVEL}, file, CONSOLE/g"'" ${DIST_DIR}/logs/log4j.properties\n' \
${DIST_DIR}/solr/bin/search_config_setup.sh; \
fi
VOLUME ["${DIST_DIR}/keystore"] VOLUME ["${DIST_DIR}/keystore"]

View File

@@ -61,6 +61,7 @@ services:
ENABLE_MASTER: "true" ENABLE_MASTER: "true"
ENABLE_SLAVE: "false" <% } %> ENABLE_SLAVE: "false" <% } %>
COMPRESS_CONTENT: "<%=gzip%>" COMPRESS_CONTENT: "<%=gzip%>"
SEARCH_LOG_LEVEL: <%=searchLogLevel%>
mem_limit: 1200m mem_limit: 1200m
environment: environment:
#Solr needs to know how to register itself with Alfresco #Solr needs to know how to register itself with Alfresco
@@ -203,4 +204,4 @@ services:
- alfresco - alfresco
- share - share
- solr6 - solr6
- content-app - content-app

View File

@@ -91,6 +91,7 @@ services:
SHARD_KEY: "shard:shardId" <% } %> SHARD_KEY: "shard:shardId" <% } %>
SHARDING_METHOD: <%=shardingMethod%> <% } %> SHARDING_METHOD: <%=shardingMethod%> <% } %>
COMPRESS_CONTENT: "<%=gzip%>" COMPRESS_CONTENT: "<%=gzip%>"
SEARCH_LOG_LEVEL: <%=searchLogLevel%>
mem_limit: 1200m mem_limit: 1200m
environment: environment:
#Solr needs to know how to register itself with Alfresco #Solr needs to know how to register itself with Alfresco

File diff suppressed because it is too large Load Diff

View File

@@ -21,8 +21,9 @@
"npm": ">= 4.0.0" "npm": ">= 4.0.0"
}, },
"dependencies": { "dependencies": {
"yeoman-generator": "^2.0.1",
"chalk": "^2.1.0", "chalk": "^2.1.0",
"yeoman-generator": "^2.0.1",
"yo": "^3.1.1",
"yosay": "^2.0.1" "yosay": "^2.0.1"
}, },
"jest": { "jest": {