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

Add hosting config support to control 3.x log disablement #10552

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

Conversation

liliankasem
Copy link
Member

@liliankasem liliankasem commented Oct 21, 2024

Issue describing the changes in this PR

resolves #10546

Pull request checklist

IMPORTANT: Currently, changes must be backported to the in-proc branch to be included in Core Tools and non-Flex deployments.

  • Backporting to the in-proc branch is not required
    • Otherwise: Link to backporting PR
  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • My changes do not require diagnostic events changes
    • Otherwise: I have added/updated all related diagnostic events and their documentation (Documentation issue linked to PR)
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Logs pre-configuration (during host startup) are unrestricted.

Post-configuration, the log prefixes are determined by the following settings:

  • DisableHostLogs is true, FeatureFlag is not set, should result in restricted system log category prefixes
    • This is the Default state. This is the only setting that would result in restricted logs.
  • DisableHostLogs is true, FeatureFlag is set, should result in unrestricted system log category prefixes
  • DisableHostLogs is false, FeatureFlag is not set, should result in unrestricted system log category prefixes
  • DisableHostLogs is false, FeatureFlag is set, should result in unrestricted system log category prefixes

@liliankasem liliankasem force-pushed the liliankasem/v3/hostlogconfig branch 2 times, most recently from 6ef92cd to 7383f7b Compare October 21, 2024 23:17
@liliankasem liliankasem reopened this Oct 28, 2024
src/WebJobs.Script/ScriptConstants.cs Outdated Show resolved Hide resolved
@liliankasem liliankasem force-pushed the liliankasem/v3/hostlogconfig branch 2 times, most recently from e9a1ef2 to 8bc251d Compare October 30, 2024 20:02
{
get
{
return GetFeatureOrDefault(ScriptConstants.HostingConfigRestrictHostLogs, "1") == "1";
Copy link
Member Author

@liliankasem liliankasem Nov 1, 2024

Choose a reason for hiding this comment

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

@fabiocav If I am understanding correctly, your requirements would want this to default to false (0) if not set?

Default behavior: logs ON
Hosting config set: logs OFF
Hosting config set, user feature flag opting out: ON

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.

4 participants