Skip to main content
from nanoyc.logging import CloudLogger

logger=CloudLogger(
iam_token='t1.9...', # your token
log_group_id='e230...' # your cloud logger group id
)

logger.trace(message='iam here')
logger.debug(message='iam here')
logger.info(message='iam here')
logger.warn(message='iam here')
logger.error(message='iam here')
logger.fatal(message='iam here')


#OR
# if u are using insede cloud function or imside vm
# apply service account with rights logging.writer

CloudLogger(
log_group_id='e230...' # your cloud logger group id
).warn(message='iam here')


# OR if you have a service account key


sa_key = {
"id": "...",
"service_account_id": "...",
"private_key": "..."
}

CloudLogger(
service_account_key=sa_key,
log_group_id='e230...' # your cloud logger group id
).warn(message='iam here')

logger.trace(message='iam here')
logger.debug(message='iam here')
logger.info(message='iam here')
logger.warn(message='iam here')
logger.error(message='iam here')
logger.fatal(message='iam here')


#OR
# if you have a service account key file
# Obtain it with yandex cloud cli
#account shoud have rights 'logging.writer'
# >yc iam key create --service-account-name [service_account_name] --output sa_key.json

CloudLogger(
service_account_file='sa_key.json',
log_group_id='e230...' # your cloud logger group id
).warn(message='iam here')

logger.trace(message='iam here')
logger.debug(message='iam here')
logger.info(message='iam here')
logger.warn(message='iam here')
logger.error(message='iam here')
logger.fatal(message='iam here')

Metadata

Release files for nanoyc-logging 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nanoyc-logging 0.1.0
File Size Uploaded
nanoyc-logging-0.1.0.tar.gz 2.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nanoyc-logging 0.1.0
File Interpreter ABI Platform
nanoyc_logging-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.9 kB

Release files / nanoyc-logging-0.1.0.tar.gz

Download URL nanoyc-logging-0.1.0.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4acf37a8a80685164417907163652e0d4134d7da6509fd21cf7439c808fde201
BLAKE2b-256 checksum
How to use checksums
b56005c69a8d29cbf62ae86e3ee909476ddf404e61ff00cdf5284f36a8790330
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / nanoyc_logging-0.1.0-py3-none-any.whl

Download URL nanoyc_logging-0.1.0-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0d265b66ed18e46955d9e511d32eceb899a44ad95980695817c12fb1081d55f
BLAKE2b-256 checksum
How to use checksums
b25f99e980c972072f02dca7d9d1ca2796ef445755635aaadb33888c021c9adf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page