smartinspectPython


NamesmartinspectPython JSON
Version 3.0.33 PyPI version JSON
download
home_page
SummarySmartInspect Python3 Library
upload_time2024-02-02 17:35:50
maintainer
docs_urlNone
authorTodd Lucas
requires_python>3.4.1
license
keywords python smartinspect logging trace tracing debugging
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 class="modulename">
SmartInspect Python3 Library
</h1>

# Overview
This API provides Python code execution tracing and diagnostics support via the SmartInspect library.
More information on SmartInspect can be found here: <a href="https://code-partners.com/offerings/smartinspect/" target="_blank">https://code-partners.com/offerings/smartinspect/</a>

Warning: Enabling diagnostics tracing could significantly impact application performance, depending on the logging level.
For example, a DEBUG logging level will generate a significant amount of trace data compared to an ERROR logging level.

Diagnostic data can be captured in various ways: Real-Time Console, File, Memory, or Text.  Diagnostic data is buffered in a message list, and sent by a separate worker thread.  This approach ensures that performance impact of the diagnosed application is minimal while diagnostics are enabled.
          
Diagnostics tracing options can be set via an application configuration settings file.

The Real-Time Console method of sending diagnostic data is the ideal way to diagnose applications that utilize services, such as ASP.NET or Windows Services.  For real-time monitoring, diagnostics trace data is sent from your application to the SmartInspect Console viewer over the TCP/IP network.  The SmartInspect Console can be started on the same machine where your application is running, or on a different machine that is accessible via the TCP/IP network.

# Documentation
* Documentation is located in the package library under the 'docs' folder; use the index.html as your starting point.  
* You can also view the latest documentation online at <a href="https://smartinspectpython.readthedocs.io/en/latest/__init__.html" target="_blank">readthedocs.io</a>.

# Requirements
* Python 3.4 or greater (not tested with Python 2).
* pycryptodome package - used for log file encryption support.
* pywin32 package - for named-pipe support (Windows platform only - use `pip install pywin32` to install manually).
* watchdog package - for detection of changes to smartinspect.cfg file settings.

# Dependencies
* SmartInspect Redistributable Console, Version 3.3+.

    The Console Viewer is required to view SmartInspect Log (.sil) formatted files, as well capture packets via the SITcpProtocol or SIPipeProtocol connections. 
    The Console Viewer (aka Redistributable Console) can be downloaded here: <a href="https://code-partners.com/offerings/smartinspect/releases/" target="_blank">https://code-partners.com/offerings/smartinspect/releases/</a>

# Quick-Start Sample Code

The following code snippets will get you started with establishing a connection to a logging Console or file.
Please refer to the `smartinspectpython.sisession.SISession` class for all of the various "Logx" methods to log data.

<em>Example 1 - Logging via tcp to a running SmartInspect Console on localhost</em>
``` python
# our package imports.
from smartinspectpython.siauto import *

# set smartinspect connections, and enable logging.
SIAuto.Si.Connections = "tcp(host=localhost,port=4228,timeout=5000)"
SIAuto.Si.Enabled = True    # enable logging

# get smartinspect logger reference.
_logsi:SISession = SIAuto.Main
_logsi.Level = SILevel.Debug   # set Message level logging

# log some test messages.
_logsi.LogSystem(SILevel.Debug, "System Information on application startup")
_logsi.LogMessage("Hello World has started")
```
<br/>

<em>Example 2 - Logging to rotating hourly log files in SmartInspect Console format</em>
``` python
# our package imports.
from smartinspectpython.siauto import *

# set smartinspect connections, and enable logging.
# this will keep 24 log files, that rotate every hour.
SIAuto.Si.Connections = "file(filename=\".\\logfiles\\AppLog.sil\", rotate=hourly, maxparts=24, append=true)"
SIAuto.Si.Enabled = True    # enable logging

# get smartinspect logger reference.
_logsi:SISession = SIAuto.Main
_logsi.Level = SILevel.Debug   # set Message level logging

# log some test messages.
_logsi.LogSystem(SILevel.Debug, "System Information on application startup")
_logsi.LogMessage("Hello World has started")
```
<br/>

<em>Example 3 - Logging to rotating hourly log files in Plain Text format</em>
``` python
# our package imports.
from smartinspectpython.siauto import *

# set smartinspect connections, and enable logging.
# this will keep 24 log files, that rotate every hour.
SIAuto.Si.Connections = "text(filename=\".\\logfiles\\AppLog.txt\", rotate=hourly, maxparts=24, append=true)"
SIAuto.Si.Enabled = True    # enable logging

# get smartinspect logger reference.
_logsi:SISession = SIAuto.Main
_logsi.Level = SILevel.Debug   # set Message level logging

# log some test messages.
_logsi.LogSystem(SILevel.Debug, "System Information on application startup")
_logsi.LogMessage("Hello World has started")
```

# Licensing
This project is licensed under the terms of the MIT End-User License Agreement (EULA) license.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "smartinspectPython",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">3.4.1",
    "maintainer_email": "",
    "keywords": "python,smartinspect,logging,trace,tracing,debugging",
    "author": "Todd Lucas",
    "author_email": "<thlucas@yahoo.com>",
    "download_url": "",
    "platform": null,
    "description": "<h1 class=\"modulename\">\r\nSmartInspect Python3 Library\r\n</h1>\r\n\r\n# Overview\r\nThis API provides Python code execution tracing and diagnostics support via the SmartInspect library.\r\nMore information on SmartInspect can be found here: <a href=\"https://code-partners.com/offerings/smartinspect/\" target=\"_blank\">https://code-partners.com/offerings/smartinspect/</a>\r\n\r\nWarning: Enabling diagnostics tracing could significantly impact application performance, depending on the logging level.\r\nFor example, a DEBUG logging level will generate a significant amount of trace data compared to an ERROR logging level.\r\n\r\nDiagnostic data can be captured in various ways: Real-Time Console, File, Memory, or Text.  Diagnostic data is buffered in a message list, and sent by a separate worker thread.  This approach ensures that performance impact of the diagnosed application is minimal while diagnostics are enabled.\r\n          \r\nDiagnostics tracing options can be set via an application configuration settings file.\r\n\r\nThe Real-Time Console method of sending diagnostic data is the ideal way to diagnose applications that utilize services, such as ASP.NET or Windows Services.  For real-time monitoring, diagnostics trace data is sent from your application to the SmartInspect Console viewer over the TCP/IP network.  The SmartInspect Console can be started on the same machine where your application is running, or on a different machine that is accessible via the TCP/IP network.\r\n\r\n# Documentation\r\n* Documentation is located in the package library under the 'docs' folder; use the index.html as your starting point.  \r\n* You can also view the latest documentation online at <a href=\"https://smartinspectpython.readthedocs.io/en/latest/__init__.html\" target=\"_blank\">readthedocs.io</a>.\r\n\r\n# Requirements\r\n* Python 3.4 or greater (not tested with Python 2).\r\n* pycryptodome package - used for log file encryption support.\r\n* pywin32 package - for named-pipe support (Windows platform only - use `pip install pywin32` to install manually).\r\n* watchdog package - for detection of changes to smartinspect.cfg file settings.\r\n\r\n# Dependencies\r\n* SmartInspect Redistributable Console, Version 3.3+.\r\n\r\n    The Console Viewer is required to view SmartInspect Log (.sil) formatted files, as well capture packets via the SITcpProtocol or SIPipeProtocol connections. \r\n    The Console Viewer (aka Redistributable Console) can be downloaded here: <a href=\"https://code-partners.com/offerings/smartinspect/releases/\" target=\"_blank\">https://code-partners.com/offerings/smartinspect/releases/</a>\r\n\r\n# Quick-Start Sample Code\r\n\r\nThe following code snippets will get you started with establishing a connection to a logging Console or file.\r\nPlease refer to the `smartinspectpython.sisession.SISession` class for all of the various \"Logx\" methods to log data.\r\n\r\n<em>Example 1 - Logging via tcp to a running SmartInspect Console on localhost</em>\r\n``` python\r\n# our package imports.\r\nfrom smartinspectpython.siauto import *\r\n\r\n# set smartinspect connections, and enable logging.\r\nSIAuto.Si.Connections = \"tcp(host=localhost,port=4228,timeout=5000)\"\r\nSIAuto.Si.Enabled = True    # enable logging\r\n\r\n# get smartinspect logger reference.\r\n_logsi:SISession = SIAuto.Main\r\n_logsi.Level = SILevel.Debug   # set Message level logging\r\n\r\n# log some test messages.\r\n_logsi.LogSystem(SILevel.Debug, \"System Information on application startup\")\r\n_logsi.LogMessage(\"Hello World has started\")\r\n```\r\n<br/>\r\n\r\n<em>Example 2 - Logging to rotating hourly log files in SmartInspect Console format</em>\r\n``` python\r\n# our package imports.\r\nfrom smartinspectpython.siauto import *\r\n\r\n# set smartinspect connections, and enable logging.\r\n# this will keep 24 log files, that rotate every hour.\r\nSIAuto.Si.Connections = \"file(filename=\\\".\\\\logfiles\\\\AppLog.sil\\\", rotate=hourly, maxparts=24, append=true)\"\r\nSIAuto.Si.Enabled = True    # enable logging\r\n\r\n# get smartinspect logger reference.\r\n_logsi:SISession = SIAuto.Main\r\n_logsi.Level = SILevel.Debug   # set Message level logging\r\n\r\n# log some test messages.\r\n_logsi.LogSystem(SILevel.Debug, \"System Information on application startup\")\r\n_logsi.LogMessage(\"Hello World has started\")\r\n```\r\n<br/>\r\n\r\n<em>Example 3 - Logging to rotating hourly log files in Plain Text format</em>\r\n``` python\r\n# our package imports.\r\nfrom smartinspectpython.siauto import *\r\n\r\n# set smartinspect connections, and enable logging.\r\n# this will keep 24 log files, that rotate every hour.\r\nSIAuto.Si.Connections = \"text(filename=\\\".\\\\logfiles\\\\AppLog.txt\\\", rotate=hourly, maxparts=24, append=true)\"\r\nSIAuto.Si.Enabled = True    # enable logging\r\n\r\n# get smartinspect logger reference.\r\n_logsi:SISession = SIAuto.Main\r\n_logsi.Level = SILevel.Debug   # set Message level logging\r\n\r\n# log some test messages.\r\n_logsi.LogSystem(SILevel.Debug, \"System Information on application startup\")\r\n_logsi.LogMessage(\"Hello World has started\")\r\n```\r\n\r\n# Licensing\r\nThis project is licensed under the terms of the MIT End-User License Agreement (EULA) license.\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "SmartInspect Python3 Library",
    "version": "3.0.33",
    "project_urls": {
        "Changelog": "https://github.com/thlucas1/SmartInspectPython/blob/main/CHANGELOG.md",
        "Documentation": "https://smartinspectpython.readthedocs.io/en/latest/__init__.html",
        "GitHub": "https://github.com/thlucas1/SmartInspectPython",
        "Issues": "https://github.com/thlucas1/SmartInspectPython/issues"
    },
    "split_keywords": [
        "python",
        "smartinspect",
        "logging",
        "trace",
        "tracing",
        "debugging"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d76d25b840578bdeb2173799258135f3e0319f9eb3358c0d8ce5659e0816e61d",
                "md5": "edee23ca9863f47308b1c5053a149734",
                "sha256": "e59afa2107b68e0fb99d4d904fd0e4780e338ab6c93c2ce7d661cb1152442347"
            },
            "downloads": -1,
            "filename": "smartinspectPython-3.0.33-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "edee23ca9863f47308b1c5053a149734",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">3.4.1",
            "size": 1577615,
            "upload_time": "2024-02-02T17:35:50",
            "upload_time_iso_8601": "2024-02-02T17:35:50.797177Z",
            "url": "https://files.pythonhosted.org/packages/d7/6d/25b840578bdeb2173799258135f3e0319f9eb3358c0d8ce5659e0816e61d/smartinspectPython-3.0.33-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-02 17:35:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thlucas1",
    "github_project": "SmartInspectPython",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "smartinspectpython"
}
        
Elapsed time: 0.46094s