Bug 15253 originally had the ability to specify the incoming IP address used for a given log statement via SIP, as well as the SIP2 account that was in use at the time. This data is very helpful for debugging purposes, and should be brought back.
Created attachment 104759 [details] [review] Bug 25464 - Add ability to specify client IP and SIP account used in SIP2 logging Bug 15253 originally had the ability to specify the incoming IP address used for a given log statement via SIP, as well as the SIP2 account that was in use at the time. This data is very helpful for debugging purposes, and should be brought back. Test Plan: 1) Apply this patch 2) Update you SIP ConversionPattern to "[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n" 3) Restart SIP 4) Use the SIP cli tester to make some SIP requests 5) View the SIP2 log, note the account id and client ip address show in the log!
Did not we want to not use Log::Log4Perl directly? Bug 15253 comment 90.
(In reply to Jonathan Druart from comment #2) > Did not we want to not use Log::Log4Perl directly? > > Bug 15253 comment 90. I think I misunderstood your question. I had thought you meant re-tooling all the code to remove C4::SIP::Logger and use Koha::Logger directly in all the code. Is that not what you meant? In any case, I think what was pushed to master is good. What impact do you think that decision has related to this bug report?
I have the feeling that Log::Log4perl::MDC->put should have a wrapper method in Koha::Logger, instead of calling Log::Log4perl directly.
(In reply to Jonathan Druart from comment #4) > I have the feeling that Log::Log4perl::MDC->put should have a wrapper method > in Koha::Logger, instead of calling Log::Log4perl directly. Ah, I think I understand what you were getting at now. I'll think about that and see if anything should be.
Created attachment 104794 [details] [review] Bug 25464 - Add ability to specify client IP and SIP account used in SIP2 logging Bug 15253 originally had the ability to specify the incoming IP address used for a given log statement via SIP, as well as the SIP2 account that was in use at the time. This data is very helpful for debugging purposes, and should be brought back. Test Plan: 1) Apply this patch 2) Update you SIP ConversionPattern to "[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n" 3) Restart SIP 4) Use the SIP cli tester to make some SIP requests 5) View the SIP2 log, note the account id and client ip address show in the log!
Created attachment 104795 [details] [review] Bug 25464 - Add ability to specify client IP and SIP account used in SIP2 logging Bug 15253 originally had the ability to specify the incoming IP address used for a given log statement via SIP, as well as the SIP2 account that was in use at the time. This data is very helpful for debugging purposes, and should be brought back. Test Plan: 1) Apply this patch 2) Update you SIP ConversionPattern to "[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n" 3) Restart SIP 4) Use the SIP cli tester to make some SIP requests 5) View the SIP2 log, note the account id and client ip address show in the log!
Created attachment 119706 [details] [review] Bug 25464 - Add ability to specify client IP and SIP account used in SIP2 logging Bug 15253 originally had the ability to specify the incoming IP address used for a given log statement via SIP, as well as the SIP2 account that was in use at the time. This data is very helpful for debugging purposes, and should be brought back. Test Plan: 1) Apply this patch 2) Update you SIP ConversionPattern to "[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n" 3) Restart SIP 4) Use the SIP cli tester to make some SIP requests 5) View the SIP2 log, note the account id and client ip address show in the log! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This works well and is a really useful addition to the SIP logs.
Created attachment 123107 [details] [review] Bug 25464 - Add ability to specify client IP and SIP account used in SIP2 logging Bug 15253 originally had the ability to specify the incoming IP address used for a given log statement via SIP, as well as the SIP2 account that was in use at the time. This data is very helpful for debugging purposes, and should be brought back. Test Plan: 1) Apply this patch 2) Update you SIP ConversionPattern to "[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n" 3) Restart SIP 4) Use the SIP cli tester to make some SIP requests 5) View the SIP2 log, note the account id and client ip address show in the log! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Minor rebase prove -v t/Logger.t - I get 1 failure, but I get it without these patches too, seems unrelated
Created attachment 123182 [details] [review] Bug 25464: Add ability to specify client IP and SIP account used in SIP2 logging Bug 15253 originally had the ability to specify the incoming IP address used for a given log statement via SIP, as well as the SIP2 account that was in use at the time. This data is very helpful for debugging purposes, and should be brought back. Test Plan: 1) Apply this patch 2) Update you SIP ConversionPattern to "[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n" 3) Restart SIP 4) Use the SIP cli tester to make some SIP requests 5) View the SIP2 log, note the account id and client ip address show in the log! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 123183 [details] [review] Bug 25464: Adjust occurrence in debian/koha-core.postinst
Pushed to master for 21.11, thanks to everybody involved!
Enhancement not backported for 21.05