The inefficient BoshConnectionManager.getSIDLogger() is slow and it is called very often. It is better to keep the longer variable locally.
Current implementation requires 2 logging statements in all places where we want to log SID events. It is not elegant and code is less clear and maintainable. We need a different approach to this.
I think a better solution would be to do it on the Java logging API level and automatically detect log entries which have to go to a additional log. We already have something like this for logging all the events related to user's connections tigase.util.LogUserFilter. I think we could/should do the SID logger in a similar way.
wojciech.kapcia@tigase.net commented 10 years ago
Created JUL Filter - use any value of enum tigase.server.bosh.BoshConnectionManager.BOSH_OPERATION_TYPE as first parameter to make distinction.
Current Bosh SID logger needs some improvements:
The inefficient BoshConnectionManager.getSIDLogger() is slow and it is called very often. It is better to keep the longer variable locally.
Current implementation requires 2 logging statements in all places where we want to log SID events. It is not elegant and code is less clear and maintainable. We need a different approach to this.
I think a better solution would be to do it on the Java logging API level and automatically detect log entries which have to go to a additional log. We already have something like this for logging all the events related to user's connections tigase.util.LogUserFilter. I think we could/should do the SID logger in a similar way.