Skip to main content

Python Paranoid Logy SDK

Project description

Paranoid Logy SDK

The Paranoid Logy SDK is a Python library for logging activities and exceptions to a remote logging service. It provides a simple interface to trace application activities and exceptions with customizable tags and additional information.

Installation

Install the package using pip:

pip install paranoid_logy

Usage

To use the Paranoid Logy SDK, initialize the Logy class with a source, IP address, and service context, then call the trace_activity or trace_exception methods.

Example

from paranoid_logy import Logy, LogyServiceContext

# Configure the service context
settings = {
    'id': 'my-app',
    'host': 'log-service.example.com',
    'portNumber': 8080
}
context = LogyServiceContext(settings)

# Initialize Logy
logy = Logy(source='my-app', ip_address='192.168.1.1', context=context)

# Trace an activity
result = logy.trace_activity(
    message='User logged in',
    additional_info={'user_id': 123},
    tags=['auth', 'info']
)
print(result.success)

# Trace an exception
try:
    1 / 0
except Exception as ex:
    result = logy.trace_exception(
        ex=ex,
        additional_info={'operation': 'division'},
        tags=['error', 'math']
    )
    print(result.success)

Requirements

  • Python 3.6 or higher
  • requests library

License

This project is licensed under the MIT License.

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

paranoid_logy-1.0.8.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

paranoid_logy-1.0.8-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file paranoid_logy-1.0.8.tar.gz.

File metadata

  • Download URL: paranoid_logy-1.0.8.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.17

File hashes

Hashes for paranoid_logy-1.0.8.tar.gz
Algorithm Hash digest
SHA256 b57c6c3614ada736f110e7d1523405b3c6f4422e166e0af791f4a52a01f30932
MD5 078c55370ac93fffa6394373f292f9d1
BLAKE2b-256 13e6296f7a532b8099ab188a2cfff7c4d25851fcf39d7c51a523ccc26872476e

See more details on using hashes here.

File details

Details for the file paranoid_logy-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: paranoid_logy-1.0.8-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.9.17

File hashes

Hashes for paranoid_logy-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 d14639aca4aa72ee1b5e922bd064a8ece68bfcef0f56833f01d5902fd8841ad5
MD5 5dcec37fbe55ea4dc9b14f318a9a76a5
BLAKE2b-256 ca2434ff46c684827977d9823ed87d769a5b299ad8e56936b5a2c97a5cfa3556

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