Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mszell committed Apr 16, 2024
2 parents 7733d69 + 9ec0103 commit c29ac87
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 18 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ the [`examples/`](https://github.com/NERDSITU/superblockify/blob/main/scripts/ex
folder and
a [minimal working example](https://github.com/NERDSITU/superblockify/blob/main/scripts/examples/mwe.py).

## Logging

The logging is done using the `logging` module. The logging level can be set in the
`setup.cfg` file. The logging level can be set to `DEBUG`, `INFO`, `WARNING`, `ERROR`
or `CRITICAL`. It defaults to `INFO` and a rotating file handler is set up to log
to `results/logs/superblockify.log`. The log file is rotated every megabyte, and the
last three log files are kept.

## Testing

The tests are specified using the `pytest` signature, see [`tests/`](tests/) folder, and
Expand Down
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ dependencies:
- geopandas
- rasterio
- shapely
- pyrosm
- numba
- tqdm
- contextily
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ dependencies = [
"geopandas",
"rasterio",
"shapely",
"pyrosm",
"numba",
"tqdm",
"contextily",
Expand Down
10 changes: 2 additions & 8 deletions superblockify/logging.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
keys = root

[handlers]
keys = consoleHandler,RotatingFileHandler
keys = consoleHandler

[formatters]
keys = simpleFormatter
Expand All @@ -13,7 +13,7 @@ handlers = consoleHandler

[logger_superblockify]
level = INFO
handlers = consoleHandler,RotatingFileHandler
handlers = consoleHandler
qualname = superblockify
propagate = 1

Expand All @@ -30,11 +30,5 @@ formatter = simpleFormatter
args = (sys.stdout,)
qualname = tqdm

[handler_RotatingFileHandler]
class = handlers.RotatingFileHandler
level = DEBUG
formatter = simpleFormatter
args = ('superblockify.log', 'w+', 1e6, 3)

[formatter_simpleFormatter]
format = %(asctime)s | %(levelname)8s | %(filename)s:%(lineno)d | %(message)s

0 comments on commit c29ac87

Please sign in to comment.