File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -52,3 +52,5 @@ ELASTIC_LOG_URL=http://localhost
5252ELASTIC_LOG_PORT = 9200
5353# Elasticsearch default log level
5454ELASTIC_LOG_LEVEL = info
55+ # Elasticsearch logging
56+ ELASTIC_LOGGING = disabled
Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ const config = Object.freeze({
3333 url : process . env . ELASTIC_LOG_URL || "http://localhost" ,
3434 port : process . env . ELASTIC_LOG_PORT || 9200 ,
3535 level : process . env . ELASTIC_LOG_LEVEL || "info"
36+ } ,
37+ logging : {
38+ es : process . env . ELASTIC_LOGGING || "disabled"
3639 }
3740} ) ;
3841
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const esTransportOpts = {
3131 } as ClientOptions ,
3232} ;
3333
34- if ( config . env == "prod" ) {
34+ if ( config . env == "production" && config . logging . es . enabled ) {
3535 logger . add ( new ( ElasticsearchTransport as any ) ( esTransportOpts ) ) ;
3636}
3737
You can’t perform that action at this time.
0 commit comments