-
Notifications
You must be signed in to change notification settings - Fork 112
Server log #173
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
Merged
Merged
Server log #173
Conversation
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
Reviewer's GuideConfigures server logging to avoid verbose output in production and for health checks, and adds a version banner to the SSR Docker entrypoint script. Sequence diagram for request logging with health-check filteringsequenceDiagram
actor Client
participant Server as createServer
participant Timer as logRequestTimer
participant Logger as logger
Client->>Server: HTTP request
Server->>Timer: logRequestTimer(req)
activate Timer
Timer-->>Server: timer
deactivate Timer
alt pathname does not start with /health
Timer->>Logger: info( Incoming request: pathname )
else pathname starts with /health
Timer--x Logger: skip incoming request log
end
Server->>Logger: (conditionally) info( Request URL: host + pathname )
note right of Server: Only if pathname does not start with /health
Client-->>Server: Response received
Server->>Timer: timer()
activate Timer
alt pathname does not start with /health
Timer->>Logger: info( Request for pathname took duration ms )
else pathname starts with /health
Timer--x Logger: skip duration log
end
deactivate Timer
Flow diagram for SSR Docker entrypoint version bannerflowchart TD
A[Start entrypoint-ssr.sh] --> B[Print version banner with APP_VERSION or dev]
B --> C{AF_BASE_URL set and APPFLOWY_BASE_URL empty?}
C -- Yes --> D[Print deprecation warning for AF_BASE_URL]
C -- No --> E[Skip deprecation warning]
D --> F[Continue container startup]
E --> F[Continue container startup]
F --> G[Start SSR server process]
G --> H[End]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- The repeated
pathname.startsWith('/health')checks inserver.tswould be easier to maintain and less error-prone if extracted into a small helper (e.g.,isHealthCheck(pathname)or aHEALTH_ENDPOINTconstant) used in all logging conditions. - Since you’ve introduced a
prettyTransportconfig, consider centralizing logger creation (or at least the transport selection based onNODE_ENV) so any future loggers can reuse the same behavior without duplicating this logic.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The repeated `pathname.startsWith('/health')` checks in `server.ts` would be easier to maintain and less error-prone if extracted into a small helper (e.g., `isHealthCheck(pathname)` or a `HEALTH_ENDPOINT` constant) used in all logging conditions.
- Since you’ve introduced a `prettyTransport` config, consider centralizing logger creation (or at least the transport selection based on `NODE_ENV`) so any future loggers can reuse the same behavior without duplicating this logic.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
josue693
pushed a commit
to josue693/AppFlowy-Web
that referenced
this pull request
Dec 21, 2025
* chore: update log * chore: update log * chore: redirect log
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.
Description
Checklist
General
Testing
Feature-Specific
Summary by Sourcery
Adjust server logging behavior and add a startup version banner for the SSR Docker container.
Enhancements:
Deployment: