Skip to main content

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()

```


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

kummis-0.0.1.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

kummis-0.0.1-py2.py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 2 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