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.3.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.3-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: loginsights-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 c3fdf2c136ef0056cde454e4464c42da540f27738311659908c8f918087e0d00
MD5 624a88ea76068b1fb377ac16a9656e24
BLAKE2b-256 90231d3fd5275ca4cf80948142b92042276486b5c4b6ac516ec5fa9ba25982c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: loginsights-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.4 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2acb335dbfa580f78d4c862ae3bc9d5b63a54913c14c92bc2fa6f57a3ace55bc
MD5 4746d95787e4f3ab959b58bb622fc85b
BLAKE2b-256 5dcafe49751e8c686461ab291d72f310a5c1e72554805861f793db6fbc2d7213

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