
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
azlog
Advanced tools
Azure pipelines have a feature called Logging commands, which makes it possible to communicate with the Azure pipeline agent.
These logging commands are often used to set a pipeline variable, but can also be used to write formatted logs in the task standard outputs, or write error/warning messages on the pipeline results web page.
For example, writing the following logs to the standard output :
print("##[group]Beginning of a group")
print("##[warning]Warning message")
print("##[error]Error message")
print("##[section]Start of a section")
print("##[debug]Debug text")
print("##[command]Command-line being run")
print("##[endgroup]")
Will render in the task logs like this :

This convenience python module is designed to make formatted logging and error/warning messages in Azure pipelines easier to use.
It uses the python logging system by creating a subclass of logging.LoggerAdapter.
pip install azlog
First create an AzLogger
from azlog import AzLogger
# Create the logger
logger = AzLogger(__name__)
logger.setLevel(logging.INFO)
The AzLogger adapter will create a python Logger with the name provided as argument.
Internally, AzLogger will create a StreamHandler using an AzFormatter as its formatter
You can also provide your own logger if you need additionnal handlers :
import logging
from azlog import AzLogger
raw_logger = logging.getLogger(__name__)
raw_logger.addHandler(logging.FileHandler('file.log'))
logger = AzLogger(raw_logger)
logger.setLevel(logging.INFO)
You can then use the AzLogger to print formatted log messages to your task output
logger.group("Beginning of a group")
logger.warning("Warning message")
logger.error("Error message")
logger.section("Start of a section")
logger.debug("Debug text")
logger.command("Command-line being run")
logger.endgroup("")
Will render in the task output like this :

Or to raise status messages
logger.issueerror("Issue an error to the pipeline")
logger.issuewarning("Issue a warning to the pipeline")
Will render in the pipeline status page like this :

FAQs
Python module to ease Azure DevOps pipelines logging commands
We found that azlog 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.