Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging Improvements #2566

Merged
merged 6 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The types of changes are:

* Added config properties to override database Engine parameters [#2511](https://github.com/ethyca/fides/pull/2511)
* Increased default pool_size and max_overflow to 50 [#2560](https://github.com/ethyca/fides/pull/2560)
* Log Fides version at startup [#2566](https://github.com/ethyca/fides/pull/2566)

* Admin UI
* Create custom fields from a resource screen - Button to Trigger modal [#524](https://github.com/ethyca/fides/pull/2536)
Expand All @@ -35,6 +36,7 @@ The types of changes are:
* Update Admin UI to show all action types (access, erasure, consent, update) [#2523](https://github.com/ethyca/fides/pull/2523)
* Removes legacy `verify_oauth_client` function [#2527](https://github.com/ethyca/fides/pull/2527)
* Updated the UI for adding systems to a new design [#2490](https://github.com/ethyca/fides/pull/2490)
* Minor logging improvements [#2566](https://github.com/ethyca/fides/pull/2566)

### Fixed

Expand Down
8 changes: 4 additions & 4 deletions src/fides/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ async def prepare_and_log_request(
@app.on_event("startup")
async def setup_server() -> None:
"Run all of the required setup steps for the webserver."

logger.warning(
logger.info(f"Starting Fides - {VERSION}")
RobertKeyser marked this conversation as resolved.
Show resolved Hide resolved
logger.info(
"Startup configuration: reloading = {}, dev_mode = {}",
CONFIG.hot_reloading,
CONFIG.dev_mode,
)
logger.warning("Startup configuration: pii logging = {}", CONFIG.logging.log_pii)
logger.info("Startup configuration: pii logging = {}", CONFIG.logging.log_pii)

if CONFIG.logging.level == DEBUG:
logger.warning(
Expand Down Expand Up @@ -296,7 +296,7 @@ async def log_request(request: Request, call_next: Callable) -> Response:
logger.bind(
method=request.method,
status_code=response.status_code,
handler_time=f"{handler_time.microseconds * 0.001}ms",
handler_time=f"{round(handler_time.microseconds * 0.001,3)}ms",
path=request.url.path,
).info("Request received")
return response
Expand Down