
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
https://github.com/idlesign/systemd-logging
|release| |lic| |coverage|
.. |release| image:: https://img.shields.io/pypi/v/systemd-logging.svg :target: https://pypi.python.org/pypi/systemd-logging
.. |lic| image:: https://img.shields.io/pypi/l/systemd-logging.svg :target: https://pypi.python.org/pypi/systemd-logging
.. |coverage| image:: https://img.shields.io/coveralls/idlesign/systemd-logging/master.svg :target: https://coveralls.io/r/idlesign/systemd-logging
Simplifies logging for systemd
Requires Python 3.6+
libsystemd.so
... code-block:: python
import logging
from systemdlogging.toolbox import init_systemd_logging
# This one line in most cases would be enough.
# By default it attaches systemd logging handler to a root Python logger.
init_systemd_logging() # Returns True if initialization went fine.
# Now you can use logging as usual.
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.debug('My debug message')
try:
raise ValueError('Log me please')
except ValueError:
# Additional context can be passed in extra.context.
logger.exception('Something terrible just happened', extra={
'message_id': True, # Generate message ID automatically.
'context': {
'FIELD1': 'one',
'FIELD2': 'two',
}
}, stack_info=True)
Read the docs to find out more.
https://systemd-logging.readthedocs.org/
Debug runs
1. Run your script with:
.. code-block::
$ sudo systemd-run -u debugme -t /usr/bin/python /home/my/testme.py
2. Watch its journal with:
.. code-block::
$ journalctl -u debugme -f -o verbose
FAQs
Simplifies logging for systemd
We found that systemd-logging demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.