Skip to content

Allow removing / updating field values #58

@vk-coder

Description

@vk-coder

Problem
using AddField we can add permanent fields. But sometimes the values of the field change over the time. As of now there is no way to fix this as you cannot delete the logger object (no api) and can remove/ update field (no api).
Sometime some fields are no longer required so there should be a provision to remove the fields.

Solution

  1. allow recreating the logger object
  2. allow updating and removing field bye key

Example


logger := xylog.GetLogger(name)
logger.AddField("test", "sample1")

logger.UpdateField("test", "sample2")
logger.RemoveField("test")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions