Skip to content

Commit

Permalink
Print logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Siecje committed Apr 10, 2019
1 parent 07dba3c commit 21dd52d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM python:3-alpine

LABEL maintainer="Jakub Dorňák <[email protected]>"

ENV PYTHONUNBUFFERED 1

COPY . /src
RUN pip install --no-cache-dir /src && rm -r /src

Expand Down
4 changes: 4 additions & 0 deletions sentrylogs/parsers/nginx.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
referrer: "http://165.225.132.103/megapage/"
"""
import re
import sys

from . import Parser
from ..conf.settings import NGINX_ERROR_PATH
Expand Down Expand Up @@ -39,6 +40,9 @@ def get_sentry_log_level(self, level):

def parse(self, line):
"""Parse a line of the Nginx error log"""
print(line, file=sys.stderr)
sys.stderr.flush()

csv_list = line.split(",")

regex = re.match(self.pattern, csv_list.pop(0))
Expand Down

0 comments on commit 21dd52d

Please sign in to comment.