Skip to main content

This is a powerful library handling the formatting of application logs and metrics to the LogInsights platform.

Project description

LogInsights-Library

LogInsights-Library is a powerful library for handling the formatting of application logs and metrics to the LogInsights platform. It is designed to help you monitor, analyze, and debug your applications with ease, offering deep insights into performance, usage patterns, and system health.

Features

  • Flexible and high-performance.
  • Full support for Python.
  • Capture and manage logs from across your application, with support for structured and unstructured log formats.
  • Define and track custom metrics to measure application performance and user interactions.
  • Easily capture exceptions and errors, providing detailed context for debugging.

Important: The Logger Must Be Configured Before Use

Before using the logger in your application, it must be configured with the appropriate connection details. Ensure that the logger is set up with the correct connection string, client application ID, and secret before any logging or metric capturing takes place.

Code example

settings.py

from loginsights.main import LogInsightsLogger

# Configuration variables (replace with your own details)
connection_string = ""  # Replace with your connection string
client_application_id = -1  # Replace with the given client application id
secret = ""  # Replace with the given secret

config = {
    "ConnectionString": connection_string,
    "ClientApplicationId": client_application_id,
    "Secret": secret
}

# Configure the logger
LogInsightsLogger.configure(config)

app.py

from loginsights.main import LogInsightsLogger

logger = LogInsightsLogger.get_logger()

# Example of logging and metric capturing in the application
username = "testuser"  # Example username

# Log an informational message
logger.info(f"{username} has been authenticated, redirecting {username} to login")

# Add a custom metric
logger.add_metric("New Users", {"Username": username})

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

loginsights-0.0.7.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

loginsights-0.0.7-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file loginsights-0.0.7.tar.gz.

File metadata

  • Download URL: loginsights-0.0.7.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for loginsights-0.0.7.tar.gz
Algorithm Hash digest
SHA256 8e7457988e354156988b9fbe0e4dee40d3508e0580bcc510e708a0d92c5cac59
MD5 53c4b45894a9c5c43face764cdd1458b
BLAKE2b-256 c281f6274624b42b6e1b7974324552bf5bb10ad11f02a0f63d99de5c029b53ce

See more details on using hashes here.

File details

Details for the file loginsights-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: loginsights-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for loginsights-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e6fc23932e982f44a36bc6d55ba4b21c3af9fd4f71533fdd75d7e72113046336
MD5 19310b9a11af213dee18e5cdb354b2a8
BLAKE2b-256 38ab8fdd007039dc2e3dfd5fee112c896737c3ed40be659af073688454d9194c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page