Skip to content

Conversation

@litianningdatadog
Copy link
Contributor

@litianningdatadog litianningdatadog commented Nov 13, 2025

https://datadoghq.atlassian.net/browse/SVLS-7818

Overview

Add DD_LOGS_ENABLED environment variable and YAML config option as an alias for DD_SERVERLESS_LOGS_ENABLED. Both variables now use OR logic, meaning logs are enabled if either variable is set to true.

Changes:

  • Add logs_enabled field to EnvConfig and YamlConfig structs
  • Implement OR logic in merge_config functions: logs are enabled if either DD_LOGS_ENABLED or DD_SERVERLESS_LOGS_ENABLED is true
  • Add comprehensive test coverage with 9 test cases covering all combinations of the two variables
  • Maintain backward compatibility with existing configurations
  • Default value remains true when neither variable is set

Testing

Set DD_LOGS_ENABLED and DD_SERVERLESS_LOGS_ENABLED to false and expect:

Otherwise the log should be available in DD console.

@litianningdatadog litianningdatadog marked this pull request as ready for review November 13, 2025 20:26
@litianningdatadog litianningdatadog requested a review from a team as a code owner November 13, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants