Skip to content
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

fix: Adding configurable timezone support for log timestamps #3955

Open
wants to merge 8 commits into
base: v3.x.x
Choose a base branch
from

Conversation

hrishikesh-nalawade
Copy link
Member

@hrishikesh-nalawade hrishikesh-nalawade commented Jan 20, 2025

Description

Currently, the API ML logs are generated with UTC timestamps. These changes will allow users to configure the timezone for log timestamps, giving them the option to set it to either their local timezone or UTC. This configuration can be managed within the zowe.yaml file using the ZWE_zowe_logging_timezone variable.

Linked to #3921

Type of change

  • fix: Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • PR title conforms to commit message guideline ## Commit Message Structure Guideline
  • I have commented my code, particularly in hard-to-understand areas. In JS I did provide JSDoc
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The java tests in the area I was working on leverage @nested annotations
  • Any dependent changes have been merged and published in downstream modules

@hrishikesh-nalawade hrishikesh-nalawade changed the title fix(logging): Adding configurable timezone support for log timestamps fix: Adding configurable timezone support for log timestamps Jan 20, 2025
@hrishikesh-nalawade hrishikesh-nalawade added do not merge Do not merge! and removed do not merge Do not merge! labels Jan 20, 2025
@@ -241,6 +241,7 @@ _BPX_JOBNAME=${ZWE_zowe_job_prefix}${CACHING_CODE} ${JAVA_BIN_DIR}java \
-Dspring.profiles.active=${ZWE_configs_spring_profiles_active:-} \
-Dspring.profiles.include=$LOG_LEVEL \
-Dapiml.logs.location=${ZWE_zowe_logDirectory} \
-Dapiml.logging.timezone=${ZWE_zowe_logging_timezone} \
Copy link
Contributor

Choose a reason for hiding this comment

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

Please provide a default value here and the the other start.sh scripts.

Suggested change
-Dapiml.logging.timezone=${ZWE_zowe_logging_timezone} \
-Dapiml.logging.timezone=${ZWE_zowe_logging_timezone:UTC} \

@@ -41,6 +41,7 @@ logging:
org.apache.tomcat.util.net.SSLUtilBase: ERROR
org.springframework.security.config.annotation.web.builders.WebSecurity: ERROR
javax.net.ssl: ERROR
timezone: ${apiml.logging.timezone:UTC}
Copy link
Contributor

Choose a reason for hiding this comment

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

Please describe this field in the additional-spring-configuration-metadata.json. Ideally with sample values.

Signed-off-by: Hrishikesh Nalawade <[email protected]>
Signed-off-by: hrishikesh-nalawade <[email protected]>
@hrishikesh-nalawade hrishikesh-nalawade force-pushed the hrishikesh-nalawade/GH3921/configurable-log-timezone branch from af87d16 to a2d6936 Compare January 24, 2025 12:26
…ference in additional-spring-configuration-metadata.json

Signed-off-by: hrishikesh-nalawade <[email protected]>
Signed-off-by: hrishikesh-nalawade <[email protected]>
This reverts commit e13caad.

Signed-off-by: hrishikesh-nalawade <[email protected]>
@hrishikesh-nalawade hrishikesh-nalawade force-pushed the hrishikesh-nalawade/GH3921/configurable-log-timezone branch from 236da89 to 02de538 Compare January 27, 2025 14:47
Copy link

sonarqubecloud bot commented Feb 3, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants