feat: Implement log endpoint#437
Merged
Merged
Conversation
+ Add origin column to database log table + Update API documentation + Add tests
+ Update documentation and tests accordingly
+ Update documentation and tests
aydex
approved these changes
Aug 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new API endpoint for logging messages from a client to new a database table called
log_client, while the server log table has been renamed tolog_server. It also adds validation, error handling, and comprehensive tests for the new logging functionality.API and Logging Functionality
POST /api/logendpoint that allows authenticated clients to send log messages to the server, with validation for message content and log level.messageproperty, which can be any string up to 1000 characters.levelproperty, which can be any of the following strings: "alert", "error", "warn", "info", "fail", "success", "log", "debug", or"verbose". If not provided, the log will default to log level "info".timestampproperty, which if not provided will default to the current time.Database Schema and Logging Procedure
log_client, while renaming the old log table tolog_server.log_to_dbSQL function into two separate functionslog_server_to_dbandlog_client_to_db.Testing and Documentation
server/tests/log.test.ts)Closes #431