
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
This API provides Python code execution tracing and diagnostics support via the SmartInspect library. More information on SmartInspect can be found here: https://code-partners.com/offerings/smartinspect/
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.
pip install pywin32
to install manually).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: https://code-partners.com/offerings/smartinspect/releases/
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.
Example 1 - Logging via tcp to a running SmartInspect Console on localhost
# 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")
Example 2 - Logging to rotating hourly log files in SmartInspect Console format
# 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")
Example 3 - Logging to rotating hourly log files in Plain Text format
# 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")
This project is licensed under the terms of the MIT End-User License Agreement (EULA) license.
FAQs
SmartInspect Python3 Library
We found that smartinspectpython demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.