开发者

Need to print class name in common code, according to situation

开发者 https://www.devze.com 2023-04-04 18:21 出处:网络
We have package like com.org.ldap.test.classname, which is shared by both DB and LDAP. As a part of log message, classname is also printed, even store is DB, log message contains ldap. We are in proce

We have package like com.org.ldap.test.classname, which is shared by both DB and LDAP. As a part of log message, classname is also printed, even store is DB, log message contains ldap. We are in process of making log messages to print according to store ie for db store, should print开发者_如何学Python like db.

Does any of you guys faced such issue?

Thanks in Advance, Ashok


If the class is shared by both DB and LDAP, move the class out of the ldap package and into a common package. If this class contains both DB and LDAP functionality, consider splitting it into two classes, one for the DB functionality (in a db package) and the other for LDAP (in an ldap package), with a common interface.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号