X Tutup
Skip to content

Remove annoying http.server logging#329

Closed
dev-dsp wants to merge 3 commits intopython-telegram-bot:masterfrom
dev-dsp:dev-dsp-patch-1
Closed

Remove annoying http.server logging#329
dev-dsp wants to merge 3 commits intopython-telegram-bot:masterfrom
dev-dsp:dev-dsp-patch-1

Conversation

@dev-dsp
Copy link
Copy Markdown

@dev-dsp dev-dsp commented Jun 21, 2016

No description provided.

@jh0ker
Copy link
Copy Markdown
Member

jh0ker commented Jun 21, 2016

Hello and thank you for your contribution!
However, maybe we should not completely remove that logging. Instead, why not log everything to the logging module instead, at DEBUG level? That way, you can still see incoming requests for debugging purposes

@jh0ker
Copy link
Copy Markdown
Member

jh0ker commented Jun 29, 2016

@dev-dsp Are you planning to fix this or should I close it?

I'd say we should just take the original code, remove the timestamp (as it's included in logging anyways) and log it to logging

    def log_message(self, format, *args):
        sys.stderr.write("%s - - [%s] %s\n" %
                         (self.address_string(),
                          self.log_date_time_string(),
                          format%args))

to

    def log_message(self, format, *args):
        self.logger.debug("%s - - %s" %
                          (self.address_string(),
                           format % args))

@jh0ker
Copy link
Copy Markdown
Member

jh0ker commented Jul 7, 2016

closing, I'll implement the solution mentioned and open a new PR.

@jh0ker jh0ker closed this Jul 7, 2016
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup