Structured logging for Spacemaker AI
Project description
# log
Python library/client for structured log output
```bash
pip install spacemakerlog
```
Example:
```python
from spacemakerlog import log
log.debug("hello something happened", some_key="with some value", another_key=123.12)
```
Output:
```bash
{"message": "hello something happened", "timestamp": "2018-08-05T18:08:01.780036Z", "another_key": 123.12, "level": "debug", "some_key": "with some value"}
```
Set log format to "text":
```python
log.set_format("text");
```
Set log level to "info":
```python
log.set_level("info");
```
## Publish
Using [twine](https://pypi.org/project/twine/) for publishing to [PyPI](https://pypi.org/project/spacemakerlog/).
```bash
brew install twine
```
```bash
python setup.py bdist_wheel
twine upload dist/*
```
Python library/client for structured log output
```bash
pip install spacemakerlog
```
Example:
```python
from spacemakerlog import log
log.debug("hello something happened", some_key="with some value", another_key=123.12)
```
Output:
```bash
{"message": "hello something happened", "timestamp": "2018-08-05T18:08:01.780036Z", "another_key": 123.12, "level": "debug", "some_key": "with some value"}
```
Set log format to "text":
```python
log.set_format("text");
```
Set log level to "info":
```python
log.set_level("info");
```
## Publish
Using [twine](https://pypi.org/project/twine/) for publishing to [PyPI](https://pypi.org/project/spacemakerlog/).
```bash
brew install twine
```
```bash
python setup.py bdist_wheel
twine upload dist/*
```
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for spacemakerlog-0.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffaa4f442eb1130b149af7c95b4f3da60b1c007701862ba32c7fad33ce1986a0 |
|
MD5 | 800017aa353366e7600df78e711c207b |
|
BLAKE2b-256 | 967a11a3b8c8d64292fa38c041e8ff8ddc8ab1ccb0f8adb4036254ee0283f82d |