Skip to content

Commit ccd697c

Browse files
authored
K8s: Add config to disable plain logs while enabling structured logs (#3087)
Signed-off-by: Viet Nguyen Duc <viet.dnguyen@katalon.com>
1 parent 56e0192 commit ccd697c

19 files changed

Lines changed: 59 additions & 0 deletions

Base/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ ENV SE_BIND_HOST="false" \
227227
SE_LOG_LEVEL="INFO" \
228228
SE_HTTP_LOGS="false" \
229229
SE_STRUCTURED_LOGS="false" \
230+
SE_PLAIN_LOGS="true" \
230231
SE_ENABLE_TRACING="true" \
231232
SE_ENABLE_TLS="false" \
232233
SE_JAVA_OPTS_DEFAULT="" \

Distributor/start-selenium-grid-distributor.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
108108
append_se_opts "--structured-logs" "${SE_STRUCTURED_LOGS}"
109109
fi
110110

111+
if [ ! -z "$SE_PLAIN_LOGS" ]; then
112+
append_se_opts "--plain-logs" "${SE_PLAIN_LOGS}"
113+
fi
114+
111115
if [ ! -z "$SE_EXTERNAL_URL" ]; then
112116
append_se_opts "--external-url" "${SE_EXTERNAL_URL}"
113117
fi

ENV_VARIABLES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,4 @@
165165
| SE_UPLOAD_FAILURE_SESSION_EVENTS | :failed,:failure | By default, a failure session event type contains ":failed" or ":failure" fires that will trigger the upload failure session only. User can define more event types which handled in your test framework, separated by comma. | |
166166
| SE_UPLOAD_FAILURE_SESSION_ONLY | false | When true, only recording of sessions that are not exited normally (session timed out, or custom events were fired by the client match with failure events defined) | |
167167
| SE_VIDEO_EVENT_DRIVEN | true | Backend of video recorder and uploader will subscribe to Grid Event Bus for session event lifecycle for processing instead of traditional polling Node session capabilities via /status endpoint. | |
168+
| SE_PLAIN_LOGS | true | Use plain log lines | --plain-logs |

EventBus/start-selenium-grid-eventbus.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
5050
append_se_opts "--structured-logs" "${SE_STRUCTURED_LOGS}"
5151
fi
5252

53+
if [ ! -z "$SE_PLAIN_LOGS" ]; then
54+
append_se_opts "--plain-logs" "${SE_PLAIN_LOGS}"
55+
fi
56+
5357
if [ ! -z "$SE_EXTERNAL_URL" ]; then
5458
append_se_opts "--external-url" "${SE_EXTERNAL_URL}"
5559
fi

Hub/start-selenium-grid-hub.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
5252
append_se_opts "--structured-logs" "${SE_STRUCTURED_LOGS}"
5353
fi
5454

55+
if [ ! -z "$SE_PLAIN_LOGS" ]; then
56+
append_se_opts "--plain-logs" "${SE_PLAIN_LOGS}"
57+
fi
58+
5559
if [ ! -z "$SE_EXTERNAL_URL" ]; then
5660
append_se_opts "--external-url" "${SE_EXTERNAL_URL}"
5761
fi

NodeBase/start-selenium-node.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
104104
append_se_opts "--structured-logs" "${SE_STRUCTURED_LOGS}"
105105
fi
106106

107+
if [ ! -z "$SE_PLAIN_LOGS" ]; then
108+
append_se_opts "--plain-logs" "${SE_PLAIN_LOGS}"
109+
fi
110+
107111
if [ ! -z "$SE_EXTERNAL_URL" ]; then
108112
append_se_opts "--external-url" "${SE_EXTERNAL_URL}"
109113
fi

NodeDocker/start-selenium-grid-docker.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
6060
append_se_opts "--structured-logs" "${SE_STRUCTURED_LOGS}"
6161
fi
6262

63+
if [ ! -z "$SE_PLAIN_LOGS" ]; then
64+
append_se_opts "--plain-logs" "${SE_PLAIN_LOGS}"
65+
fi
66+
6367
if [ ! -z "$SE_EXTERNAL_URL" ]; then
6468
append_se_opts "--external-url" "${SE_EXTERNAL_URL}"
6569
fi

NodeKubernetes/start-selenium-grid-kubernetes.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
6060
append_se_opts "--structured-logs" "${SE_STRUCTURED_LOGS}"
6161
fi
6262

63+
if [ ! -z "$SE_PLAIN_LOGS" ]; then
64+
append_se_opts "--plain-logs" "${SE_PLAIN_LOGS}"
65+
fi
66+
6367
if [ ! -z "$SE_EXTERNAL_URL" ]; then
6468
append_se_opts "--external-url" "${SE_EXTERNAL_URL}"
6569
fi

Router/start-selenium-grid-router.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
8585
append_se_opts "--structured-logs" "${SE_STRUCTURED_LOGS}"
8686
fi
8787

88+
if [ ! -z "$SE_PLAIN_LOGS" ]; then
89+
append_se_opts "--plain-logs" "${SE_PLAIN_LOGS}"
90+
fi
91+
8892
if [ ! -z "$SE_EXTERNAL_URL" ]; then
8993
append_se_opts "--external-url" "${SE_EXTERNAL_URL}"
9094
fi

SessionQueue/start-selenium-grid-session-queue.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
5050
append_se_opts "--structured-logs" "${SE_STRUCTURED_LOGS}"
5151
fi
5252

53+
if [ ! -z "$SE_PLAIN_LOGS" ]; then
54+
append_se_opts "--plain-logs" "${SE_PLAIN_LOGS}"
55+
fi
56+
5357
if [ ! -z "$SE_EXTERNAL_URL" ]; then
5458
append_se_opts "--external-url" "${SE_EXTERNAL_URL}"
5559
fi

0 commit comments

Comments
 (0)