Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
pip install tinylogging
from tinylogging import Logger, Level
logger = Logger(name="my_logger", level=Level.DEBUG)
logger.info("This is an info message.")
logger.error("This is an error message.")
logger.debug("This is a debug message.")
from tinylogging import FileHandler
file_handler = FileHandler(file_name="app.log", level=Level.WARNING)
logger.handlers.add(file_handler)
logger.warning("This warning will be logged to both console and file.")
from tinylogging import Formatter
formatter = Formatter(template="{time} - {name} - {level} - {message}", colorize=False)
logger = Logger(name="custom_logger", formatter=formatter)
logger.info("This log message uses a custom format.")
logger.disable()
logger.info("This message will not be logged.")
logger.enable()
import asyncio
from tinylogging import AsyncLogger, AsyncFileHandler
async def main():
logger = AsyncLogger(name="async_logger")
file_handler = AsyncFileHandler(file_name="app.log")
logger.handlers.add(file_handler)
await logger.info("This is an info message.")
await logger.error("This is an error message.")
await logger.debug("This is a debug message.")
if __name__ == "__main__":
asyncio.run(main)
This project is licensed under the MIT License.
FAQs
python logging library
We found that tinylogging 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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.