ECB pattern: can I have print method in Entity?

31 Views Asked by At

Goodmorning everyone. Can I have print methods in the entity? or is it conceptually wrong?

1

There are 1 best solutions below

0
On

Sharing few points, I hope it might help you.

  • Use of print anywhere in project is wrong. If needed, use logger instead.
  • What information you are logging, if it is confidential information then it is very wrong. For example - crediatial, name, password etc..
  • If you want to log for debugging or for catching exception you must log with appropriate log level with proper message.