Skip to content

Update loguru to push logs to the DB instead of a file #576

@kepler452b123

Description

@kepler452b123

Background

Currently (as seen in the onboarding), network logs are written to a file. Change this so that logs are written to the DB instead. We currently do not have a table in the DB to store logs (https://dbdiagram.io/d/UWOrbital-66b7e5628b4bb5230ec5bff8), so this will need to be added. This will be useful in case we want to connect our logs for the app itself to data visualization platforms (e.g. Grafana), or if we want to make our own monitoring platform in the future.

Requirements

Describe the requirements that this feature must meet.

  • We currently do not have a table in the DB to store logs. Add a new Schema called logs and add a table called logs.api with suitable columns for the table (e.g. priority, msg, time)
  • Update the db diagram linked above
  • Setup the new table in our GS repo (check gs/backend/data/tables)
  • Run the app and make sure the table is created in postgres
  • Look into how to set the database as the sink for our loguru logs

Important Information

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions