Skip to main content

mklog 📆 Convert any output into a log (date and time prepended to each line)

mklog is a python program that converts standard input, content of files, or output of a command in a log-like format, i.e. current date and time is prepended to each line.

Run mklog –help for the list of available options; see examples below.

Example

Download using wget:

$ mklog  -c wget https://archive.org/download/Popeye_Nearlyweds/Popeye_Nearlyweds.ogv
2015-02-05 13:13:41 --2015-02-05 13:13:41--  http://t/
2015-02-05 13:13:41 Résolution de t (t)… échec : Nom ou service inconnu.
2015-02-05 13:13:41 wget : impossible de résoudre l'adresse de l'hôte « t »
2015-02-05 13:13:41 --2015-02-05 13:13:41--  https://archive.org/download/Popeye_Nearlyweds/Popeye_Nearlyweds.ogv
2015-02-05 13:13:41 Résolution de archive.org (archive.org)… 207.241.224.2
2015-02-05 13:13:41 Connexion à archive.org (archive.org)|207.241.224.2|:443… connecté.
2015-02-05 13:13:42 requête HTTP transmise, en attente de la réponse… 302 Moved Temporarily
2015-02-05 13:13:42 Emplacement : https://ia700502.us.archive.org/6/items/Popeye_Nearlyweds/Popeye_Nearlyweds.ogv [suivant]
2015-02-05 13:13:42 --2015-02-05 13:13:42--  https://ia700502.us.archive.org/6/items/Popeye_Nearlyweds/Popeye_Nearlyweds.ogv
2015-02-05 13:13:42 Résolution de ia700502.us.archive.org (ia700502.us.archive.org)… 207.241.237.122
2015-02-05 13:13:42 Connexion à ia700502.us.archive.org (ia700502.us.archive.org)|207.241.237.122|:443… connecté.
2015-02-05 13:13:43 requête HTTP transmise, en attente de la réponse… 200 OK
2015-02-05 13:13:43 Taille : 26698780 (25M) [video/ogg]
2015-02-05 13:13:43 Sauvegarde en : « Popeye_Nearlyweds.ogv »
2015-02-05 13:13:43
2015-02-05 13:13:44      0K .......... .......... .......... .......... ..........  0%  126K 3m26s
[...]
2015-02-05 13:14:18  26000K .......... .......... .......... .......... .......... 99%  541K 0s
2015-02-05 13:14:18  26050K .......... .......... ...                             100% 5,80M=34s
2015-02-05 13:14:18
2015-02-05 13:14:18 2015-02-05 13:14:18 (762 KB/s) — « Popeye_Nearlyweds.ogv » sauvegardé [26698780/26698780]
2015-02-05 13:14:18
2015-02-05 13:14:18 Terminé — 2015-02-05 13:14:18 —
2015-02-05 13:14:18 Temps total effectif : 37s
2015-02-05 13:14:18 Téléchargés : 1 fichiers, 25M en 34s (762 KB/s)

Monitor logs (which are not dated):

$ tail -f /var/log/gdm3/\:0.log | mklog

What’s new?

See changelog.

Download and install

See the end of list for a (quick and dirty) Debian package.

  • From sources:

  • With pip:

    pip install mklog
  • Quick and dirty Debian (and Ubuntu?) package

    This requires stdeb to be installed:

    python3 setup.py --command-packages=stdeb.command bdist_deb
    sudo dpkg -i deb_dist/mklog-<VERSION>_all.deb

See also

See also (other program with the same purpose):

Metadata

Release files for mklog 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mklog 1.5.0
File Size Uploaded Provenance Actions
mklog-1.5.0.tar.gz 29.1 kB Without provenance Details for mklog-1.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mklog 1.5.0
File Interpreter ABI Platform Actions
mklog-1.5.0-py3-none-any.whl Python 3 none any Details for mklog-1.5.0-py3-none-any.whl

Total release size: 49.5 kB

Release files / mklog-1.5.0.tar.gz

Download URL mklog-1.5.0.tar.gz
Size 29.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a387646eba69c1baf69dca51e55d50d8d279d33ee2febf60c9329918637f62b7
BLAKE2b-256 checksum
How to use checksums
51f9f469ca348e0a4551bdd29d165bda37cb0eda1b682b08806bc604beb0c3c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / mklog-1.5.0-py3-none-any.whl

Download URL mklog-1.5.0-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afdaedaf2639274ff8c55d3178b2759d1189633b73594ccfa83d3e4232d3bff5
BLAKE2b-256 checksum
How to use checksums
29c683725ce5d4c0a73a88b81148fae3b4e5e427b3b61db1be681aabafb93e81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for mklog 1.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page