Skip to main content

Logger with saving logs to s3 storage

Project description

Xgua - Logger with saving logs to s3 storage

Save files to the vault to fix bugs and improve your product!


Quick Startup

import asyncio
from Xgua.config import Config, S3Config
from Xgua.logger import Logger

s3 = S3Config("access_key", "secret_key", "endpoint_url", "bucket_name")
config = Config(s3)
logger = Logger(config)

async def main():
	try:
		"0" + 1
	except Exception as e:
		await logger.log(e)

asyncio.run(main())

Configuration

Argument README
access_key Get after adding a serialized user
secret_key Get after adding a serialized user
endpoint_url If you haven't enabled "Virtual-Hosted Addressing", then https://s3.storage.selcloud.ru or else name-container.s3.storage.selcloud.ru
bucket_name The name of the container at creation.

How do I get all the parameters?

Through the side navigation block go to "Access Control" -> Next tab "Service Users" and add a new user.

Fast open "Access Control"

How do you create a container?

Using the navigation box on the right, navigate to "Cloud Storage" and click on the "Create Container" button

View Photo

Fast Open "Storage"

Config

Now substitute your values by key

s3 = S3Config("access_key", "secret_key", "endpoint_url", "bucket_name")

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

Xgua-0.0.1.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

Xgua-0.0.1-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

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