Initial commit
This commit is contained in:
51
README.md
Normal file
51
README.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# PlanetaryTime
|
||||
|
||||
<!-- TODO: short description of the library -->
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pip install planetarytime
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```python
|
||||
import planetarytime
|
||||
|
||||
# TODO: usage examples
|
||||
```
|
||||
|
||||
## Logging
|
||||
|
||||
This library uses [loguru](https://github.com/Delgan/loguru) for internal logging.
|
||||
|
||||
By default, loguru has a sink to `stderr` enabled. If your application also uses
|
||||
loguru, library logs will appear in your configured sinks automatically — no extra
|
||||
setup needed.
|
||||
|
||||
### Suppressing library logs
|
||||
|
||||
To silence all logs from this library:
|
||||
|
||||
```python
|
||||
from loguru import logger
|
||||
logger.disable("<package_name>")
|
||||
```
|
||||
|
||||
To re-enable them:
|
||||
|
||||
```python
|
||||
logger.enable("<package_name>")
|
||||
```
|
||||
|
||||
### Filtering by level
|
||||
|
||||
If you want library logs only from `WARNING` and above, filter by the package name:
|
||||
|
||||
```python
|
||||
from loguru import logger
|
||||
import sys
|
||||
|
||||
logger.add(sys.stderr, filter={"<package_name>": "WARNING"})
|
||||
```
|
||||
Reference in New Issue
Block a user