# Filebeat Not Pushing Python Logging Messages

**URL:** <https://discuss.elastic.co/t/filebeat-not-pushing-python-logging-messages/184227>\
**Category:** Elasticsearch\
**Created:** [June 4, 2019, 4:27pm UTC](https://discuss.elastic.co/t/filebeat-not-pushing-python-logging-messages/184227 "2019-06-04T16:27:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryh](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@ryh](https://discuss.elastic.co/u/ryh)\
**Post date:** [June 4, 2019, 4:27pm UTC](https://discuss.elastic.co/t/filebeat-not-pushing-python-logging-messages/184227/1 "2019-06-04T16:27:36Z")

</div>

Hi All,

Thanks in advance.

I'm having issues with filebeat not pushing my Python logging messages to Logstash (not visible in Kibana).

Here is my logging config.

```
def get_module_logger(mod_name):
    """
    To use this, do logger = get_module_logger( __name__ )
    """
    logger = logging.getLogger(mod_name)
    handler = logging.StreamHandler()
    formatter = logging.Formatter(
        '%(asctime)s [%(name)-12s] %(levelname)-8s %(message)s')
    handler.setFormatter(formatter)
    logger.addHandler(handler)
    logger.setLevel(logging.DEBUG)
    return logger

logger = get_module_logger( __name__ )

```

Here's my filebeat.yml  
\> filebeat.inputs:

> ```
> - type: docker
> combine_partial: true
> containers:
> path: "/usr/share/dockerlogs/data"
> stream: "stdout"
> ids:
> - "*"
> exclude_files: ['\.gz$']
> ignore_older: 10m
> 
> filebeat.config:
> modules:
> path: ${path.config}/modules.d/*.yml
> reload.enabled: false
> 
> processors:
> # decode the log field (sub JSON document) if JSON encoded, then maps it's fields to elasticsearch fields
> - decode_json_fields:
> fields: ["log", "message"]
> target: ""
> # overwrite existing target elasticsearch fields while decoding json fields
> overwrite_keys: true
> - add_docker_metadata:
> host: "unix:///var/run/docker.sock"
> 
> output:
> logstash:
> hosts: 'logstash'
> 
> logging.files:
> path: /var/log/filebeat
> name: filebeat
> keepfiles: 7
> permissions: 0644
> ssl.verification_mode: none
> 
> ```

If I run a simple print statement, it does get forwarded to logstash and it's visible in Kibana. Ex. `print("{\"app\": \"mimidae\", \"info\": \"Still no SpitzTlmHk\", \"test\": \"Is it working??\"}")`

Thanks,  
Ry

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 2, 2019, 4:27pm UTC](https://discuss.elastic.co/t/filebeat-not-pushing-python-logging-messages/184227/2 "2019-07-02T16:27:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
