
Product
Introducing Module Reachability: Focus on the Vulnerabilities That Matter
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
The slack logging package provides an interface to send log messages to a suitably configured slack channel
slack_logging currently supports python2 and python3.
The slack logging does not override the default python logging. It provides a simple interface to create a logger capable of writing messages to slack
>>> import slack_logging
>>> logger = slack_logging.configure_slack_logger(logger_name='my-app-logger')
After creating and integrating a slack app with a channel, a webhook is provided.
This webhook should be added to slack_logging
before the logging handler will attempt to write to the channel:
>>> import slack_logging
>>> channel = slack_logging.Channel('channel-1', 'https://slack.com/webhook/channel-1/')
>>> slack_logging.WebHooks.configure_channel(channel)
When creating a slack_logging.channel
instance, you have the option of providing a log level.
If the log level is provided, the logging to the channel is restricted to that level.
Any logging calls with a level different (higher or lower) than that level will not be logged.
If not level is provided, the logger will have the level of the handler.
configuring channels after handlers have been created will cause the handlers to send messages to the new channels.
The slack-logging
python package simply provides a SlackLoggerHandler
that with the SlackLoggerFormatter
creates a json message sent using the requests library.
The handler only supports simple text messages.
Stubs are in place to support attachments.
Only the default python error levels are fully supported.
While other log levels can be set, by default they will not have full message format support.
To support a new log level, create the level as normal and assign it a name via logging
>>> import slack_logging
>>> slack_logging.set_level_emoji(log_level='MY_LOG_LEVEL', emoji=':joy:')
FAQs
Python logger/handler for slack integration
We found that slack-logging demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.
Company News
Socket is bringing best-in-class reachability analysis into the platform — cutting false positives, accelerating triage, and cementing our place as the leader in software supply chain security.
Product
Socket is introducing a new way to organize repositories and apply repository-specific security policies.