In log4net, we stack NDC like
using (var scope1 = ThreadContext.Stacks["NDC"].Push("Foo")) { using (var scope2 = ThreadContext.Stacks[