Luca213
Luca213

Reputation: 1

ECB pattern: can I have print method in Entity?

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

Upvotes: 0

Views: 31

Answers (1)

arpitj938
arpitj938

Reputation: 86

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.

Upvotes: 0

Related Questions