2
0
mirror of https://github.com/boostorg/log.git synced 2026-01-19 16:32:09 +00:00

1 Commits

Author SHA1 Message Date
Andrey Semashev
699fcc1281 Made channel loggers deep-copy the channel attribute on copy ctor/assignment.
Although attributes are normally only shallow-copied, it is useful to allow
the channel attribute to be deep copied when the parent logger is copied. This
would eliminate the unexpected effect of modifying the channel in the copy, as
it would otherwise affect the original logger. This commit makes copy
constructor and assignment of the channel loggers deep-copy the channel value.

The problem was reported in:

https://stackoverflow.com/questions/66120806/deep-copy-of-boost-logger.

Note that any other attributes that might have been added to the logger are
still shallow copied.
2021-02-10 14:45:52 +03:00