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
- allow recreating the logger object
- allow updating and removing field bye key
Example
logger := xylog.GetLogger(name)
logger.AddField("test", "sample1")
logger.UpdateField("test", "sample2")
logger.RemoveField("test")
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
Example