# How to set a logLevel for Elasticsearch and Kibana CustomResource?

**URL:** <https://discuss.elastic.co/t/how-to-set-a-loglevel-for-elasticsearch-and-kibana-customresource/239038>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [June 29, 2020, 1:34am UTC](https://discuss.elastic.co/t/how-to-set-a-loglevel-for-elasticsearch-and-kibana-customresource/239038 "2020-06-29T01:34:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![charith-elastic](https://avatars.discourse-cdn.com/v4/letter/c/3ec8ea/32.png) [@charith-elastic](https://discuss.elastic.co/u/charith-elastic)\
**Post date:** [June 29, 2020, 7:40am UTC](https://discuss.elastic.co/t/how-to-set-a-loglevel-for-elasticsearch-and-kibana-customresource/239038/2 "2020-06-29T07:40:17Z")

</div>

You can use the configuration options provided by [Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/logging.html#configuring-logging-levels) and [Kibana](https://www.elastic.co/guide/en/kibana/current/settings.html). The easiest option would be to use the `config` field to modify `elasticsearch.yaml` or `kibana.yaml` as follows:

```auto
---
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: hulk
spec:
  version: 7.8.0
  nodeSets:
  - name: default
    count: 3
    config:
      logger.org.elasticsearch: warn
---
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  name: hulk
spec:
  version: 7.8.0
  count: 1
  elasticsearchRef:
    name: hulk
  config:
    logging.quiet: true

```

You can also use environment variables if you prefer that approach:

```auto
---
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: hulk
spec:
  version: 7.8.0
  nodeSets:
  - name: default
    count: 3
    podTemplate:
      spec:
        containers:
          - name: elasticsearch
            env:
              - name: logger.org.elasticsearch
                value: warn
---
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  name: hulk
spec:
  version: 7.8.0
  count: 1
  elasticsearchRef:
    name: hulk
  podTemplate:
    spec:
      containers:
        - name: kibana
          env:
            - name: LOGGING_QUIET
              value: "true"

```

If you need more control, you can also craft your own log4j configuration file as described in [Log4j Configuration](https://discuss.elastic.co/t/log4j-configuration/220565).

---

_[View the full topic](https://discuss.elastic.co/t/how-to-set-a-loglevel-for-elasticsearch-and-kibana-customresource/239038)._
