-
Notifications
You must be signed in to change notification settings - Fork 590
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
Core API, formatting by env, req support, tear down #4246
Conversation
PRO-4479 As a developer I can call the new structured logging API methods
Technical strategy See Structured logging API section of the Tech Design, which can be found here: https://github.com/apostrophecms/tech-designs/blob/main/3.x/structured-logging/design.md#structured-logging-api As well as: Acceptance Criteria
|
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.
Direction feels good. I know you're not asking for review yet but I did spot a few small things.
PRO-4480 As a developer I can pass req to the new structured logging API to automatically include more data about the request
Technical Strategy See Logging related to a request in the Tech Design. Acceptance Criteria
PRO-4483 As a developer I can ensure my custom logger is properly shut down
Please see tech design: Acceptance Criteria:
PRO-4482 As a devops person I can decide which log levels and events merit my attention
See Filtering in the Tech Design for technical details. Be sure to read through "Default Policy" as well as the environment variable override option. Acceptance criteria
PRO-4481 As a devops person I can configure Apostrophe to send only objects to the configured logger
See Pure object mode in the Tech Design for the technical approach. Acceptance Criteria
PRO-4486 As a developer I can visually scan structured logs in the terminal
See Formatting of logs in development versus production in the Tech Design for the technical strategy. Acceptance criteria
PRO-4487 As a devops person I can analyze structured logs with tools that expect one log entry per line and minimal performance impact at runtime
See Formatting of logs in development versus production in the Tech Design for the technical strategy. Acceptance criteria
|
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.
Generally great. One or two functional concerns and some performance recommendations.
Summary
logDebug
,logInfo
, logWarnand
logError` (can be used in any module):async destroy()
method.Closes PRO-4479, PRO-4480, PRO-4481, PRO-4482, PRO-4483, PRO-4486, PRO-4487.
What are the specific steps to test this change?
See the above mentioned tickets acceptance criteria.
What kind of change does this PR introduce?
(Check at least one)
Make sure the PR fulfills these requirements:
If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.
Other information: