Skip to content
Snippets Groups Projects
Commit ec65985d authored by George Politis's avatar George Politis
Browse files

Adds configuration for logging arbitrary packets.

parent 6fba8a3d
No related branches found
No related tags found
No related merge requests found
......@@ -56,6 +56,13 @@ public class PacketLoggingConfiguration
public final static String PACKET_LOGGING_ICE4J_ENABLED_PROPERTY_NAME
= "net.java.sip.communicator.packetlogging.PACKET_LOGGING_ICE4J_ENABLED";
/**
* Configuration property for enabling/disabling arbitrary packet logging.
*/
public final static String PACKET_LOGGING_ARBITRARY_ENABLED_PROPERTY_NAME
= "net.java.sip.communicator.packetlogging." +
"PACKET_LOGGING_ARBITRARY_ENABLED";
/**
* Configuration property for packet logging file count.
*/
......@@ -93,6 +100,11 @@ public class PacketLoggingConfiguration
*/
private boolean ice4jLoggingEnabled = true;
/**
* Is Packet Logging Service enabled for arbitrary packets.
*/
private boolean arbitraryLoggingEnabled = true;
/**
* The limit for the file size.
* 0 means no limit.
......@@ -146,13 +158,24 @@ public boolean isRTPLoggingEnabled()
/**
* Checks whether packet logging is enabled in the configuration
* for Ice4J.
* @return <tt>true</tt> if packet logging is enabled for RTP.
* @return <tt>true</tt> if packet logging is enabled for Ice4J.
*/
public boolean isIce4JLoggingEnabled()
{
return this.ice4jLoggingEnabled;
}
/**
* Checks whether packet logging is enabled in the configuration
* for arbitrary packets.
* @return <tt>true</tt> if packet logging is enabled for arbitrary
* packets.
*/
public boolean isArbitraryLoggingEnabled()
{
return this.arbitraryLoggingEnabled;
}
/**
* The limit for the file size. 0 means no limit.
* @return the file size limit.
......@@ -184,6 +207,7 @@ public void setGlobalLoggingEnabled(boolean enabled)
this.jabberLoggingEnabled = false;
this.rtpLoggingEnabled = false;
this.ice4jLoggingEnabled = false;
this.arbitraryLoggingEnabled = false;
}
this.globalLoggingEnabled = enabled;
......@@ -225,6 +249,15 @@ public void setIce4JLoggingEnabled(boolean enabled)
this.ice4jLoggingEnabled = true;
}
/**
* Change whether packet logging for arbitrary packets is enabled.
* @param enabled <tt>true</tt> if we enable it.
*/
public void setArbitraryLoggingEnabled(boolean enabled)
{
this.arbitraryLoggingEnabled = true;
}
/**
* Changes the file size limit.
* @param limit the new limit size.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment