Skip to content

Alpha 0.1.10/553 add logging on frontend and backend#652

Closed
Jopat2409 wants to merge 77 commits intorelease-alpha-0.1.10from
alpha-0.1.10/553-add-logging-on-frontend-and-backend
Closed

Alpha 0.1.10/553 add logging on frontend and backend#652
Jopat2409 wants to merge 77 commits intorelease-alpha-0.1.10from
alpha-0.1.10/553-add-logging-on-frontend-and-backend

Conversation

@Jopat2409
Copy link
Copy Markdown
Contributor

Description because this is a fairly big one, feel free to disagree with any of this and request it be changed

Centralised Logging

Logging is all done through the electron process because it means we can have a centralised configuration for both frontend, backend and any other logging sources that we might end up adding at some point, and knowing from when I tried to do the ticket off alpha-0.1.9, trying to configure the python logging to be the same as the log4js logging was annoying. It also means that we have access to all application logs on the frontend, which is good if we ever want to implement some sort of log viewing from within the application itself (or want to access most recent logs to display in the error boundary perhaps, anything like that)

image

Backend logs are just passed through the socket connection to the socket handler in redux and then we just have a basic loggingSlice that keeps a short history of the logs and dispatches handlers which can consume the logs however they like (currently we have 1 for passing the logs to the electron process and one for console logging them).

Default Configuration

Default configuration for the packaged application

  • Logs are saved to two different files (frontend.log and backend.log) in appdata/fgs/logs
  • Log level of INFO
  • Default format: [25/08/2025 21:45:40:780] [INFO] - Killing backend

Developer Settings

Added developer settings - special settings tab that's only available in development environment, allows us to have an actual way of configuring development settings without development configs etc.
Added a couple of settings for changing logging behaviour in development to make it easier (though maybe we can have it enablable in build, I know a lot of applications allow you to toggle developer options if you really want to)

  • Added setting to save log files in gcs/logs instead of appdata so that you can just check them from IDE
  • Added setting to change format of log message (I figured we probably want the same format across packaged application instances but can't hurt to let developers change it if they want)
  • Added setting to push all logs to one file so you can see the frontend and backend logs together
  • Added setting to change the logging level
image

…Labs/FGCS into alpha-0.1.10/553-add-logging-on-frontend-and-backend
…Labs/FGCS into alpha-0.1.10/553-add-logging-on-frontend-and-backend
@Jopat2409
Copy link
Copy Markdown
Contributor Author

Christ nevermind

Jopat2409 and others added 9 commits August 26, 2025 22:38
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment on lines +64 to +69
"logToWorkingDirectory": {
"description": "Log files will be placed in gcs/logs instead of appdata/FGCS/logs",
"display": "Log to Development Workspace",
"type": "boolean",
"default": false
},
Copy link
Copy Markdown
Member

@1Blademaster 1Blademaster Sep 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of making this a setting, can we check if it's a development environment and log to gcs/logs, if it's prod then use default log location?

Comment thread gcs/src/components/dashboard/preFlightChecklist/checkListArea.jsx Outdated
Comment thread gcs/src/helpers/logHandlers.js Outdated
Comment thread gcs/src/redux/middleware/socketMiddleware.js
Comment thread radio/app/controllers/armController.py Outdated
Comment thread radio/app/controllers/frameController.py Outdated
Comment thread radio/app/controllers/gripperController.py Outdated
Comment thread radio/app/controllers/gripperController.py Outdated
Comment thread radio/app/controllers/gripperController.py Outdated
Comment thread radio/tests/mission_test_files/upload_mission_helper.py
Jopat2409 and others added 10 commits September 14, 2025 17:00
Co-authored-by: Kush Makkapati <kush.makkapati@icloud.com>
Co-authored-by: Kush Makkapati <kush.makkapati@icloud.com>
Co-authored-by: Kush Makkapati <kush.makkapati@icloud.com>
Co-authored-by: Kush Makkapati <kush.makkapati@icloud.com>
Co-authored-by: Kush Makkapati <kush.makkapati@icloud.com>
@1Blademaster
Copy link
Copy Markdown
Member

This has become very stale, closing this PR.

@1Blademaster 1Blademaster deleted the alpha-0.1.10/553-add-logging-on-frontend-and-backend branch February 21, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants