Skip to content

logger.UpdateContext checks for disabled logger using equality #643

@mitar

Description

@mitar

logger.UpdateContext checks for disabled logger:

	if l == disabledLogger {
		return
	}

I think this is problematic as it should check in a more general way, to handle also Nop and zero values. In my tests I found race conditions because I was reusing same global nop-logger. I think a better check would be something like it was done in #617. Do you agree? I can make a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions