In Java, What are responsibilities of ValueObject? Is it reasonable for ValueObject to import LOGGER components?
Asked
Active
Viewed 55 times
0
-
1There shouldn't really be any logic inside a value object that would require logging. – Kayaman May 21 '18 at 08:03
-
@Kayaman could you share something about blog or background for this theory – Haven Lin May 21 '18 at 08:08
-
No, I don't know off-hand any blog posts that would discuss VO and logging. Maybe you can find one. – Kayaman May 21 '18 at 08:12
1 Answers
1
Since a VO is supposed to represent a pure value without any specific logic, it really shouldn't bother with any logging components.
If you need to log the contents of the VO, it should be done where it's used, not inside the VO itself.

Kayaman
- 72,141
- 5
- 83
- 121