Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Lever not assigned in Writer via custom LogMessage #666

@abumq

Description

@abumq

This issue was originally noticed in residue logging server. Code here

Basically, in Writer construction with custom LogMessage, m_level is not assigned, as a result level's enabled/disabled state is dependent upon undefined behaviour.

Writer(LogMessage* msg, base::DispatchAction dispatchAction = base::DispatchAction::NormalLog) :
    m_msg(msg), m_line(0), m_logger(nullptr), m_proceed(false), m_dispatchAction(dispatchAction) {
  }

This is ignored as a result of this

m_proceed = m_logger->enabled(m_level) 

We need to assign anything that is available in msg as long as they're valid values, especially m_level as it's checked at construct

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions