Skip to content

Conversation

@djeebus
Copy link
Contributor

@djeebus djeebus commented Dec 9, 2025

These extra logs provide very little value, but take up a lot of physical and visual space

These extra logs provide very little value, but take up a lot of physical and visual space
// Console logging configuration
config := zap.Config{
DisableStacktrace: loggerConfig.DisableStacktrace,
DisableStacktrace: true,
Copy link

Choose a reason for hiding this comment

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

Hardcoding DisableStacktrace: true ignores the LoggerConfig.DisableStacktrace field passed by callers. This breaks the API contract where callers might intentionally pass DisableStacktrace: false to enable stacktraces for debugging. Consider: DisableStacktrace: loggerConfig.DisableStacktrace or remove the field from the config struct if it's no longer needed.

IsInternal: config.IsInternal,
IsDebug: true,
DisableStacktrace: !config.IsInternal,
DisableStacktrace: true,
Copy link

Choose a reason for hiding this comment

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

Same issue: hardcoding DisableStacktrace: true ignores the conditional logic \!config.IsInternal that was previously used. This means internal services lose the ability to enable stacktraces even when needed for debugging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think there's a reason to log stack traces for every log message

Copy link
Member

@jakubno jakubno left a comment

Choose a reason for hiding this comment

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

This may be also worth checking Development field in zap.Config in
packages/shared/pkg/logger/logger.go

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