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:
.. code-block:: python
$ 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 <https://git.framasoft.org/spalax/mklog/blob/main/CHANGELOG.md>`_.
Download and install
--------------------
See the end of list for a (quick and dirty) Debian package.
* From sources:
* Download: https://pypi.python.org/pypi/mklog
* Install (in a `virtualenv`, not to mess with your distribution installation system)::
python3 setup.py install
* With pip::
pip install mklog
* Quick and dirty Debian (and Ubuntu?) package
This requires `stdeb <https://github.com/astraw/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):
* `ts <http://joeyh.name/code/moreutils/>`_
Raw data
{
"_id": null,
"home_page": "http://framagit.org/spalax/mklog",
"name": "mklog",
"maintainer": "",
"docs_url": null,
"requires_python": "<4,>=3.7",
"maintainer_email": "",
"keywords": "log timestamp",
"author": "Louis Paternault",
"author_email": "spalax@gresille.org",
"download_url": "https://files.pythonhosted.org/packages/18/bb/bcac217e81b09cdab4003be704ecdf103c64d26d8e9cb79375a72094e5b0/mklog-1.3.0.tar.gz",
"platform": null,
"description": "mklog \ud83d\udcc6 Convert any output into a log (date and time prepended to each line)\n=============================================================================\n\n`mklog` is a python program that converts standard input, content of files, or\noutput of a command in a log-like format, i.e. current date and time is\nprepended to each line.\n\nRun `mklog --help` for the list of available options; see examples below.\n\nExample\n-------\n\nDownload using wget:\n\n.. code-block:: python\n\n $ mklog -c wget https://archive.org/download/Popeye_Nearlyweds/Popeye_Nearlyweds.ogv\n 2015-02-05 13:13:41 --2015-02-05 13:13:41-- http://t/\n 2015-02-05 13:13:41 R\u00e9solution de t (t)\u2026 \u00e9chec\u00a0: Nom ou service inconnu.\n 2015-02-05 13:13:41 wget\u00a0: impossible de r\u00e9soudre l'adresse de l'h\u00f4te \u00ab\u00a0t\u00a0\u00bb\n 2015-02-05 13:13:41 --2015-02-05 13:13:41-- https://archive.org/download/Popeye_Nearlyweds/Popeye_Nearlyweds.ogv\n 2015-02-05 13:13:41 R\u00e9solution de archive.org (archive.org)\u2026 207.241.224.2\n 2015-02-05 13:13:41 Connexion \u00e0 archive.org (archive.org)|207.241.224.2|:443\u2026 connect\u00e9.\n 2015-02-05 13:13:42 requ\u00eate HTTP transmise, en attente de la r\u00e9ponse\u2026 302 Moved Temporarily\n 2015-02-05 13:13:42 Emplacement\u00a0: https://ia700502.us.archive.org/6/items/Popeye_Nearlyweds/Popeye_Nearlyweds.ogv [suivant]\n 2015-02-05 13:13:42 --2015-02-05 13:13:42-- https://ia700502.us.archive.org/6/items/Popeye_Nearlyweds/Popeye_Nearlyweds.ogv\n 2015-02-05 13:13:42 R\u00e9solution de ia700502.us.archive.org (ia700502.us.archive.org)\u2026 207.241.237.122\n 2015-02-05 13:13:42 Connexion \u00e0 ia700502.us.archive.org (ia700502.us.archive.org)|207.241.237.122|:443\u2026 connect\u00e9.\n 2015-02-05 13:13:43 requ\u00eate HTTP transmise, en attente de la r\u00e9ponse\u2026 200 OK\n 2015-02-05 13:13:43 Taille\u00a0: 26698780 (25M) [video/ogg]\n 2015-02-05 13:13:43 Sauvegarde en\u00a0: \u00ab\u00a0Popeye_Nearlyweds.ogv\u00a0\u00bb\n 2015-02-05 13:13:43\n 2015-02-05 13:13:44 0K .......... .......... .......... .......... .......... 0% 126K 3m26s\n [...]\n 2015-02-05 13:14:18 26000K .......... .......... .......... .......... .......... 99% 541K 0s\n 2015-02-05 13:14:18 26050K .......... .......... ... 100% 5,80M=34s\n 2015-02-05 13:14:18\n 2015-02-05 13:14:18 2015-02-05 13:14:18 (762 KB/s) \u2014 \u00ab\u00a0Popeye_Nearlyweds.ogv\u00a0\u00bb sauvegard\u00e9 [26698780/26698780]\n 2015-02-05 13:14:18\n 2015-02-05 13:14:18 Termin\u00e9 \u2014\u00a02015-02-05 13:14:18\u00a0\u2014\n 2015-02-05 13:14:18 Temps total effectif\u00a0: 37s\n 2015-02-05 13:14:18 T\u00e9l\u00e9charg\u00e9s\u00a0: 1\u00a0fichiers, 25M en 34s (762 KB/s)\n\nMonitor logs (which are not dated)::\n\n $ tail -f /var/log/gdm3/\\:0.log | mklog\n\nWhat's new?\n-----------\n\nSee `changelog <https://git.framasoft.org/spalax/mklog/blob/main/CHANGELOG.md>`_.\n\nDownload and install\n--------------------\n\nSee the end of list for a (quick and dirty) Debian package.\n\n* From sources:\n\n * Download: https://pypi.python.org/pypi/mklog\n * Install (in a `virtualenv`, not to mess with your distribution installation system)::\n\n python3 setup.py install\n\n* With pip::\n\n pip install mklog\n\n* Quick and dirty Debian (and Ubuntu?) package\n\n This requires `stdeb <https://github.com/astraw/stdeb>`_ to be installed::\n\n python3 setup.py --command-packages=stdeb.command bdist_deb\n sudo dpkg -i deb_dist/mklog-<VERSION>_all.deb\n\nSee also\n--------\n\nSee also (other program with the same purpose):\n\n* `ts <http://joeyh.name/code/moreutils/>`_\n",
"bugtrack_url": null,
"license": "GPLv3 or any later version",
"summary": "Append date and time before text",
"version": "1.3.0",
"project_urls": {
"Documentation": "http://mklog.readthedocs.io",
"Homepage": "http://framagit.org/spalax/mklog",
"Source": "https://framagit.org/spalax/mklog",
"Tracker": "https://framagit.org/spalax/mklog/issues"
},
"split_keywords": [
"log",
"timestamp"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2fdc17dad6221767cac0b9f07cbf2184fa6076b860c542b580dd9cb7fa4b610d",
"md5": "4485961da5bc329f5d157f9abe7ebe47",
"sha256": "5fe9551a1b93a1bd25f2410414b5e15893329f82faa81d240d0a01888f759664"
},
"downloads": -1,
"filename": "mklog-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4485961da5bc329f5d157f9abe7ebe47",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.7",
"size": 20336,
"upload_time": "2023-10-07T18:51:04",
"upload_time_iso_8601": "2023-10-07T18:51:04.893214Z",
"url": "https://files.pythonhosted.org/packages/2f/dc/17dad6221767cac0b9f07cbf2184fa6076b860c542b580dd9cb7fa4b610d/mklog-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "18bbbcac217e81b09cdab4003be704ecdf103c64d26d8e9cb79375a72094e5b0",
"md5": "7de241fd58575bb47aa18bbae04274ce",
"sha256": "3e6261213777420465c40be242cac296c61d576382724608405897618e23c795"
},
"downloads": -1,
"filename": "mklog-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "7de241fd58575bb47aa18bbae04274ce",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.7",
"size": 28763,
"upload_time": "2023-10-07T18:51:06",
"upload_time_iso_8601": "2023-10-07T18:51:06.663400Z",
"url": "https://files.pythonhosted.org/packages/18/bb/bcac217e81b09cdab4003be704ecdf103c64d26d8e9cb79375a72094e5b0/mklog-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-07 18:51:06",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "mklog"
}