xinbc / jdiameter

Automatically exported from code.google.com/p/jdiameter
0 stars 0 forks source link

Fix logging - errors are being logged in DEBUG level #54

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Configure a peer that is not accessible
2. Enable DEBUG logging

What is the expected output? What do you see instead?
Connection errors and etc. are being logged in DEBUG which is not appropriate 
in current situation.
I don't see a reason why this should be done intentionally.

What version of the product are you using? On what operating system?
1.5.0.FINAL, Linux/Windows

2014-02-13 19:16:11,342 DEBUG [FSM-SPeer{Uri=aaa://192.168.2.75:13868; 
State=null; con=null; incConnull }_1-0] 
[org.jdiameter.client.impl.controller.PeerImpl] Failure establishing connection.
org.jdiameter.client.api.io.TransportException: Cannot init transport:
        at org.jdiameter.client.impl.transport.tcp.TCPClientConnection.connect(TCPClientConnection.java:111)
        at org.jdiameter.client.impl.controller.PeerImpl$ActionContext.connect(PeerImpl.java:665)
        at org.jdiameter.server.impl.fsm.PeerFSMImpl$3.processEvent(PeerFSMImpl.java:302)
        at org.jdiameter.client.impl.fsm.PeerFSMImpl$3.run(PeerFSMImpl.java:207)
        at java.lang.Thread.run(Thread.java:744)
Caused by: java.net.ConnectException: Connection refused
        at sun.nio.ch.Net.connect0(Native Method)
        at sun.nio.ch.Net.connect(Net.java:465)
        at sun.nio.ch.Net.connect(Net.java:457)
        at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:670)
        at org.jdiameter.client.impl.transport.tcp.TCPTransportClient.initialize(TCPTransportClient.java:109)
        at org.jdiameter.client.impl.transport.tcp.TCPClientConnection.connect(TCPClientConnection.java:107)
        ... 4 more

        2014-02-13 19:18:41,579 DEBUG [FSM-SPeer{Uri=aaa://192.168.2.75:13868; State=null; con=null; incConnull }_3-2] [org.jdiameter.client.impl.controller.PeerImpl] Failure establishing connection.
org.jdiameter.client.api.io.TransportException: Cannot init transport:
        at org.jdiameter.client.impl.transport.tcp.TCPClientConnection.connect(TCPClientConnection.java:111)
        at org.jdiameter.client.impl.controller.PeerImpl$ActionContext.connect(PeerImpl.java:665)
        at org.jdiameter.server.impl.fsm.PeerFSMImpl$4.processEvent(PeerFSMImpl.java:370)
        at org.jdiameter.client.impl.fsm.PeerFSMImpl$3.run(PeerFSMImpl.java:207)
        at java.lang.Thread.run(Thread.java:744)
Caused by: java.net.ConnectException: Connection refused
        at sun.nio.ch.Net.connect0(Native Method)
        at sun.nio.ch.Net.connect(Net.java:465)
        at sun.nio.ch.Net.connect(Net.java:457)
        at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:670)
        at org.jdiameter.client.impl.transport.tcp.TCPTransportClient.initialize(TCPTransportClient.java:109)
        at org.jdiameter.client.impl.transport.tcp.TCPClientConnection.connect(TCPClientConnection.java:107)
        ... 4 more

Original issue reported on code.google.com by be.lietaus on 14 Feb 2014 at 9:42

GoogleCodeExporter commented 9 years ago
Furthermore, some INFO level messages should be printed in DEBUG as they do not 
provide any information that could be useful to server admin. Such as:

2014-02-14 14:14:15,356 INFO  [ApplicationSession-2] 
org.jdiameter.common.impl.app.cca.CCASessionFactoryImpl - Diameter CCA 
SessionFactory :: stateChanged :: source[ServerCCASessionImpl 
[sessionData=org.jdiameter.server.impl.app.cca.ServerCCASessionDataLocalImpl@ba6
4ee9c]], oldState[IDLE], newState[OPEN]

Original comment by be.lietaus on 14 Feb 2014 at 12:25

GoogleCodeExporter commented 9 years ago
Agree that some messages should be moved to INFO, mostly they are on DEBUG 
level since it may happen to have one (or more) unreachable peer configured 
which would be polluting the INFO level for all it's retries.

Please provide a suggested patch for those messages which you feel their level 
should be changed and we can evaluate such change.

Original comment by brainslog on 4 Jul 2014 at 1:01

GoogleCodeExporter commented 9 years ago
This issue was updated by revision ece1409e8235.

Showing connection error message in INFO level (DEBUG contains stacktrace)

Original comment by brainslog on 31 Jul 2014 at 1:21