Kumparan Log Format
Project description
# kumlog
Kumparan Logging Json Format
# Example Usage
```
def main():
logger.debug("test DEBUG logger")
logger.info("test INFO logger")
logger.warning("test WARNING logger")
logger.error("test ERROR logger")
logger.critical("test CRITICAL logger")
try:
raise ValueError("Input is not valid")
except Exception as e:
logger.exception(e)
try:
raise OSError("not found")
except Exception as e:
logger.exception(e)
if __name__ == '__main__':
# Setup the logging handler and the formatter
handler = logging.StreamHandler(stream=sys.stdout)
formatter = StackdriverLoggingFormatter(service_name="stackdriver-logging",
service_version="latest", environment="staging")
handler.setFormatter(formatter)
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
main()
```
Kumparan Logging Json Format
# Example Usage
```
def main():
logger.debug("test DEBUG logger")
logger.info("test INFO logger")
logger.warning("test WARNING logger")
logger.error("test ERROR logger")
logger.critical("test CRITICAL logger")
try:
raise ValueError("Input is not valid")
except Exception as e:
logger.exception(e)
try:
raise OSError("not found")
except Exception as e:
logger.exception(e)
if __name__ == '__main__':
# Setup the logging handler and the formatter
handler = logging.StreamHandler(stream=sys.stdout)
formatter = StackdriverLoggingFormatter(service_name="stackdriver-logging",
service_version="latest", environment="staging")
handler.setFormatter(formatter)
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
main()
```
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
kummis-0.0.1.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for kummis-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 468f0a07bfda635f8f0b05c4a3764bb23a46186ababce9ea0532235904bc155a |
|
MD5 | fc22d8dc4b9f9a22e3f5325241264eef |
|
BLAKE2b-256 | d092640cc1225703dd1331d84f4d2466773b91705479c455305fc84d11a8040f |