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

Uploaded Python 3

File details

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

File metadata

  • Download URL: loginsights-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 5c24e88f798d620e2723a93623dcf9998d82fa7cdc2bdf353e0bc4a5c6e6a2e9
MD5 01383ee8bef264f231830c9b8d2a0118
BLAKE2b-256 e21a5906b3f7cc13cd306c4c5f7f27f8513740a68f4db22a857bcf02aa2b5dd4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: loginsights-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b426edd58f5555433a960f30a76c454ea2081d2494917234355eab827c7566c0
MD5 081f643b045cd1cb590cbfefa0af9079
BLAKE2b-256 061b0b3726dfb2bb7f067298eb81590ef54ad85e9877dd661a700267e0078ce1

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