New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aklogger

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aklogger

A generic logging package for python projects

  • 0.2.2
  • PyPI
  • Socket score

Maintainers
1

aklogger

Keep track of all the events happening in your project: A generic logging package for python projects.

[Features]

  • Logging to console
  • Logging to file
  • Push logs to slack

Installation

$ pip install aklogger

Usage

Following script will log messages to slack, file and console:

from aklogger import logger

logger.set_name('mycroft')
logger.setLevel('DEBUG')

# This will log to console
logger.info('Some Dummy log', 'Some dummy details of the dummy log')

# Enable File log
logger.log_to_file('file.log')

# This will log to file and console
logger.info('Some Dummy log', 'Some dummy details of the dummy log')

# Enable Slack
logger.enable_slack(SLACK_TOKEN)

# Set slack level
logger.set_slack_level('WARNING')

# Now the logs will be log to slack
logger.warning('Some Dummy log', 'Some dummy details of the dummy log')

# You can also do a force push to slack no matter what the slack level is set.
logger.info('Dummy log', 'Details of the dummy log', force_push_slack=True)

See python logging docs for more uses.

Keywords

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc