{
"info": {
"author": "Trelay Wang",
"author_email": "trelwan@celestica.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Build Tools"
],
"description": "PyLog2html\n==========\n\nSupport both Python2 and Python3\n\nPyLog2Html can save log to HTML file, there is plenty of reasons to save log into HTML file:\n\n* Highlight errors\n* Colorful output\n* More readable\n* Insert table\n\nInstallation\n------------\n\nInstall with pip::\n\n pip install PyLog2html\n\nQuick Start\n-----------\n\n.. code-block:: python\n\n from HTMLLogger import HTMLLogger\n logger=HTMLLogger(name=\"Test App\", html_filename=\"log.html\", console_log=True)\n logger.info('This is info')\n logger.debug('This is debug')\n logger.warning(\"This is warning\")\n logger.error('This is an error')\n logger.table('Add html table:
')\n\nView the log:\n-------------\n\n* Open log file \"log.html\" in browser, it takes a while to open the log file, it depends on the performance of your computer.\n* Select a level name to dedicate on particular messages.\n* Or type a keyword to find your interesting message(select checkbox to mismatch case)\n* If you set console_log to True when you'll see the log would also print to console\n\nVersion\n-------\n\n1.0.4\n\nClass Inheritance:\n------------------\n\n* [HTMLFileHandler]: The derived class of Python logging.handlers.RotatingFileHandler\n* [HTMLFormatter]: The derived class of Python logging.Formatter\n* [CONFormatter]: The derived class of Python logging.Formatter\n\n\nHTMLFileHandler\n---------------\n\nThe sub class of logging.handlers.RotatingFileHandler, you can see this class is to extend the function of Rotating HTML file, comparing to its parent class, it has following advantages:\n\n* The format of log file name will be saved as \"log_1.html\" & \"log_2.html\". \n* Write the beginning and end strings in HTML, like \"\\\\...\\\\\"\n* Have a switch to let user choose if need to rotate files: If it's False, the log file will be added and rollover occurs whenever the current log file is nearly maxBytes in length. If it's True, it behaves like logging.handlers.RotatingFileHandler.\n\n\nHTMLFormatter\n-------------\n\nThe sub class of logging.Formatter, you can see this class is to add HTML tags, comparing to its parent class, it has following advantages:\n\n* Highlight keyword by setting its size and the Italic\n* Find the correct color to display for particular messages in Html file.\n* The keyword should be decorated by keyword(which can be found in config file or variables you defined.)\n\nCONFormatter\n------------\n\nThe sub class of logging.Formatter, this module is to print log to console with color if console_log was set to True when you instance class PyLogger and raise errors if the color you chose is not supported by Console.\n\nCurrently, Only following color are supported in Console:\n\n * yellow\n * cyan\n * magenta\n * blue\n * orange\n * green\n * red\n * black\n * white\n * normal\n\nHTMLLogger\n----------\nThe main logger creator, the sub class of logging.Logger, use to instance a single logging channel. By default, you should use this class rather than use logging.Logger. If you'd like to create a logger with the specified name, you should call function and add HTMLFormatter and HTMLFileHandler using addFilter and addHandler.\n\nThe config\n----------\n\nYou have two options here: \n\n* Use `oslo.config `_ , and read variables from the config file\n* Set Variables in your script.\n\nAn example:\n\n.. code-block:: python\n\n from HTMLLogger import HTMLLogger\n\n app_name=\"Red_Fish\"\n Keyword_Italic=True\n Keyword_FontSize=5\n HighLight_msg_tag_start=\"\"\n HighLight_msg_tag_end=\"\"\n msg_color=dict(\n err_color=\"magenta\",\n warn_color=\"orange\",\n info_color=\"white\",\n dbg_color=\"white\")\n log_format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s'\n HtmlmaxBytes=1024*1024*5\n console_log=True\n html_title=\"Default Title\"\n html_filename=\"Redfish_log.html\"\n\n logger=PyLogger(name=app_name, html_filename=html_filename, mode='a',\n html_title=html_title,level=logging.DEBUG,\n HtmlmaxBytes=HtmlmaxBytes, encoding=None, delay=False,\n html_format=log_format, msg_color=msg_color,\n Keyword_Italic=Keyword_Italic,Keyword_FontSize=Keyword_FontSize,\n HighLight_msg_tag_start=HighLight_msg_tag_start,\n HighLight_msg_tag_end=HighLight_msg_tag_end,console_log=console_log,\n Html_Rotating=False,Html_backupCount=5)\n\n logger.debug('This is debug')\n logger.info('This is info')\n logger.warning(\"This is warning\")\n logger.error('This is error xxx')\n logger.table('Add html table:')\n\n\n**Free Software, Hell Yeah!**\n\n.. (Contact trelwan@celestica.com if you have any questions.)",
"description_content_type": null,
"docs_url": null,
"download_url": "https://github.com/trelay/PyLog2html/tarball/1.0.4",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/trelay/PyLog2html",
"keywords": "logging html",
"license": "MIT",
"maintainer": null,
"maintainer_email": null,
"name": "PyLog2html",
"package_url": "https://pypi.org/project/PyLog2html/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/PyLog2html/",
"project_urls": {
"Download": "https://github.com/trelay/PyLog2html/tarball/1.0.4",
"Homepage": "https://github.com/trelay/PyLog2html"
},
"release_url": "https://pypi.org/project/PyLog2html/1.0.4/",
"requires_dist": null,
"requires_python": null,
"summary": "Python logging to html",
"version": "1.0.4"
},
"last_serial": 2399416,
"releases": {
"1.0.0": [
{
"comment_text": "",
"digests": {
"md5": "b94b5f6406b90318763f341b26ad4051",
"sha256": "eec3101c9bc45ebad701df776159154ea196f753416c7495ded573c78fd65072"
},
"downloads": -1,
"filename": "PyLog2html-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "b94b5f6406b90318763f341b26ad4051",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6730,
"upload_time": "2016-08-24T09:14:05",
"url": "https://files.pythonhosted.org/packages/93/fe/5a3ba40fe700fd079d29bcba9d5a50c2fd36ffee018fa7e5978e673d67c8/PyLog2html-1.0.0.tar.gz"
}
],
"1.0.1": [
{
"comment_text": "",
"digests": {
"md5": "9961968ec58d97953c411b19a31d73e8",
"sha256": "0d75b22ecb040223e13061cd00475d7be55119fefc43892e98217048c0f75d4c"
},
"downloads": -1,
"filename": "PyLog2html-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "9961968ec58d97953c411b19a31d73e8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8296,
"upload_time": "2016-08-25T01:23:22",
"url": "https://files.pythonhosted.org/packages/0c/e1/1354eab0470c9b361a41a7f3fda6edcfadef5d2b44d0e4f9d03be4923cc7/PyLog2html-1.0.1.tar.gz"
}
],
"1.0.2": [
{
"comment_text": "",
"digests": {
"md5": "e8f607aad0c18bcf90895ce6b67df237",
"sha256": "8e1dbe6b327de8adfc564a914fb7229fd118e0a384b203688b54d34111d5205b"
},
"downloads": -1,
"filename": "PyLog2html-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "e8f607aad0c18bcf90895ce6b67df237",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8794,
"upload_time": "2016-10-14T08:07:33",
"url": "https://files.pythonhosted.org/packages/b0/b5/6eea20e8a605b0f49a6ca110078739a9b0e838cab8e718855e4680668cb8/PyLog2html-1.0.2.tar.gz"
}
],
"1.0.3": [
{
"comment_text": "",
"digests": {
"md5": "8ac06017ed5dec9113f50f9e03a3aa3e",
"sha256": "49d87c7b074e53885da7ef6a0e4f73f3c8f0839cfb01f97f374249c7b6869505"
},
"downloads": -1,
"filename": "PyLog2html-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "8ac06017ed5dec9113f50f9e03a3aa3e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9979,
"upload_time": "2016-10-14T12:28:28",
"url": "https://files.pythonhosted.org/packages/21/98/f616aace78aa888653b5c6c3474ed23c17ee66781dd35aaccbf2977d1fa1/PyLog2html-1.0.3.tar.gz"
}
],
"1.0.4": [
{
"comment_text": "",
"digests": {
"md5": "9590205753b3434099ab9e3689a6f87f",
"sha256": "1926931d226538946eb4da61a658d8e3f11e41622addc14f0513ba8acdfff026"
},
"downloads": -1,
"filename": "PyLog2html-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "9590205753b3434099ab9e3689a6f87f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9965,
"upload_time": "2016-10-14T13:40:46",
"url": "https://files.pythonhosted.org/packages/ab/4f/d63b8bf684ca2e43d70ee5aa742ae9c0dca1c0a2aaf7e790e9dee2c3a48a/PyLog2html-1.0.4.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "9590205753b3434099ab9e3689a6f87f",
"sha256": "1926931d226538946eb4da61a658d8e3f11e41622addc14f0513ba8acdfff026"
},
"downloads": -1,
"filename": "PyLog2html-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "9590205753b3434099ab9e3689a6f87f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9965,
"upload_time": "2016-10-14T13:40:46",
"url": "https://files.pythonhosted.org/packages/ab/4f/d63b8bf684ca2e43d70ee5aa742ae9c0dca1c0a2aaf7e790e9dee2c3a48a/PyLog2html-1.0.4.tar.gz"
}
]
}