gecko-dev/python/mach
Mike Hommey 40bb771e9f Bug 1819783 - Avoid logging errors when dealing with records with no params. r=ahal
Under some conditions, logging fails with messages like:

```
--- Logging error ---
Traceback (most recent call last):
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/logging/__init__.py", line 1083, in emit
    msg = self.format(record)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/logging/__init__.py", line 927, in format
    return fmt.format(record)
  File "/Users/glandium/mozilla-unified/python/mach/mach/logging.py", line 156, in format
    formatted_msg = record.msg.format(**record.params)
AttributeError: 'LogRecord' object has no attribute 'params'
```

In those cases, the record does have a message, as expected, but it's
preformatted and there are no params in the record at all, rather than
an empty dict.

Differential Revision: https://phabricator.services.mozilla.com/D171408
2023-03-07 21:04:39 +00:00
..
docs Bug 1749473 - fix some typos in doc r=firefox-source-docs-reviewers,sylvestre DONTBUILD 2023-03-01 09:35:11 +00:00
mach Bug 1819783 - Avoid logging errors when dealing with records with no params. r=ahal 2023-03-07 21:04:39 +00:00
.isort.cfg Bug 1790816 - Reformat python/ with isort. r=#linter-reviewers CLOSED TREE 2022-12-21 09:56:15 +00:00
README.rst
bash-completion.sh
metrics.yaml Bug 1689162 - Update to Glean metrics schema v2. r=Dexter,firefox-build-system-reviewers,nalexander DONTBUILD 2022-02-14 08:57:27 +00:00
pings.yaml Bug 1689162 - Update to Glean metrics schema v2. r=Dexter,firefox-build-system-reviewers,nalexander DONTBUILD 2022-02-14 08:57:27 +00:00
setup.cfg
setup.py Bug 1801836 - Remove no longer necessary 'from __future__' imports under python/. r=linter-reviewers,glandium,ahal DONTBUILD 2022-12-23 01:26:15 +00:00

README.rst

====
mach
====

Mach (German for *do*) is a generic command dispatcher for the command
line.

To use mach, you install the mach core (a Python package), create an
executable *driver* script (named whatever you want), and write mach
commands. When the *driver* is executed, mach dispatches to the
requested command handler automatically.

To learn more, read the docs in ``docs/``.