No project description provided
Project description
How to publish to pypi
# set up pypi token
poetry config pypi-token.pypi my-token
# build the project
poetry build
# publish the project
poetry publish
# DONE
Demo example
Double check lock for singleton
import sfdevtools.observability.log_helper as lh
import logging
logger = lh.init_logger(logger_name="sfdevtools_logger", is_json_output=False)
# create class X
class X(SDC):
pass
# create class Y
class Y(SDC):
pass
A1, A2 = X.instance(), X.instance()
B1, B2 = Y.instance(), Y.instance()
assert A1 is not B1
assert A1 is A2
assert B1 is B2
logger.info('A1 : {}'.format(A1))
logger.info('A2 : {}'.format(A2))
logger.info('B1 : {}'.format(B1))
logger.info('B2 : {}'.format(B2))
Send log to logstash
logger = lh.init_logger(logger_name="connection_tester_logger"
, is_json_output=False
, is_print_to_console=True
, is_print_to_logstash=True
, logstash_host="<the host name>"
, logstash_port=5960
, logstash_user_tags=["Test001", "Test002"])
logger.info("Test Message from test")
logger.error("Test Message from test")
logger.warning("Test Message from test")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sfdevtools-1.7.0.tar.gz
(7.4 kB
view hashes)
Built Distribution
sfdevtools-1.7.0-py3-none-any.whl
(10.5 kB
view hashes)
Close
Hashes for sfdevtools-1.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48c8412ee5459d7581a461417d9f9921e4eb5b459c0b22402d5ba8a85dc0e29a |
|
MD5 | 70ee34d861e4a1a7755dc2669665515e |
|
BLAKE2b-256 | 40b80ccb8ee5897eb08ad01de1ac410fb3b2fba814c74dff4109de1b54a97c1d |