Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding journald and enabling syslog logging #542

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

glaslos
Copy link
Member

@glaslos glaslos commented Dec 23, 2020

No description provided.

@glaslos glaslos requested a review from srenfo March 11, 2021 22:56
requirements.txt Outdated Show resolved Hide resolved

class SysLogger(object):
def __init__(self, host, port, facility, logdevice, logsocket):
logger = logging.getLogger()
self.logger = logging.getLogger("conpot")
handler = logging.StreamHandler()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way we're silently swallowing configuration errors (typos mostly). It's also a bit odd to have a "SyslogLogger" print to the console. I'd rather raise an error below.

Alternatively we could make this behavior explicit, like if str(logsocket).lower() == "stderr":, because it should actually be useful to have events printed to the console. At that point we may as well rename "socket" to "mode".

But then we should be able to use /dev/stderr to the same effect - but I haven't tested it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants