public class SipLogger
extends java.lang.Object
implements gov.nist.core.StackLogger, gov.nist.core.ServerLogger
Constructor and Description |
---|
SipLogger() |
Modifier and Type | Method and Description |
---|---|
void |
closeLogFile()
Dummy implementation for
ServerLogger.closeLogFile() |
void |
disableLogging()
Disable logging altogether.
|
void |
enableLogging()
Enable logging (globally).
|
int |
getLineCount()
Get the line count in the log stream.
|
java.net.InetSocketAddress |
getLocalAddressForDestination(java.net.InetAddress dst,
int dstPort,
java.net.InetAddress localAddress,
java.lang.String transport)
Returns a local address to use with the specified TCP destination.
|
java.lang.String |
getLoggerName()
Returns a logger name.
|
boolean |
isLoggingEnabled()
Determines whether logging is enabled.
|
boolean |
isLoggingEnabled(int logLevel)
Return true/false if logging is enabled at a given level.
|
void |
logDebug(java.lang.String message)
Log a message into the log file.
|
void |
logError(java.lang.String message)
Log an error message.
|
void |
logError(java.lang.String message,
java.lang.Exception ex)
Logs an exception and an error message error message.
|
void |
logException(java.lang.Exception exception)
Prints the specified exception as a warning.
|
void |
logException(java.lang.Throwable ex)
Log an exception.
|
void |
logFatalError(java.lang.String message)
Log an error message.
|
void |
logInfo(java.lang.String string)
Log an info message.
|
void |
logMessage(gov.nist.javax.sip.message.SIPMessage message,
java.lang.String from,
java.lang.String to,
boolean sender,
long time)
Logs the specified message and details.
|
void |
logMessage(gov.nist.javax.sip.message.SIPMessage message,
java.lang.String from,
java.lang.String to,
java.lang.String status,
boolean sender)
Logs the specified message and details.
|
void |
logMessage(gov.nist.javax.sip.message.SIPMessage message,
java.lang.String from,
java.lang.String to,
java.lang.String status,
boolean sender,
long time)
Logs the specified message and details.
|
void |
logStackTrace()
logs a stack trace.
|
void |
logStackTrace(int traceLevel)
logs a stack trace.
|
void |
logTrace(java.lang.String message)
Logs the specified trace with a debuf level.
|
void |
logWarning(java.lang.String string)
Log a warning message.
|
void |
setBuildTimeStamp(java.lang.String buildTimeStamp)
Logs the build time stamp of the jain-sip reference implementation.
|
void |
setSipStack(javax.sip.SipStack sipStack)
A dummy implementation.
|
void |
setStackProperties(java.util.Properties stackProperties)
Dummy implementation for
ServerLogger.setStackProperties(
Properties) |
public void logStackTrace()
logStackTrace
in interface gov.nist.core.StackLogger
public void logStackTrace(int traceLevel)
logStackTrace
in interface gov.nist.core.StackLogger
traceLevel
- currently unused.public int getLineCount()
getLineCount
in interface gov.nist.core.StackLogger
public void logException(java.lang.Throwable ex)
logException
in interface gov.nist.core.StackLogger
ex
- the exception that we are to log.public void logDebug(java.lang.String message)
logDebug
in interface gov.nist.core.StackLogger
message
- message to log into the log file.public void logFatalError(java.lang.String message)
logFatalError
in interface gov.nist.core.StackLogger
message
- --
error message to log.public void logError(java.lang.String message)
logError
in interface gov.nist.core.StackLogger
message
- error message to log.public boolean isLoggingEnabled()
isLoggingEnabled
in interface gov.nist.core.StackLogger
public boolean isLoggingEnabled(int logLevel)
isLoggingEnabled
in interface gov.nist.core.StackLogger
logLevel
- the level that we'd like to check loggability for.public void logError(java.lang.String message, java.lang.Exception ex)
logError
in interface gov.nist.core.StackLogger
message
- that message that we'd like to log.ex
- the exception that we'd like to log.public void logWarning(java.lang.String string)
logWarning
in interface gov.nist.core.StackLogger
string
- the warning that we'd like to logpublic void logInfo(java.lang.String string)
logInfo
in interface gov.nist.core.StackLogger
string
- the message that we'd like to log.public void disableLogging()
disableLogging
in interface gov.nist.core.StackLogger
public void enableLogging()
enableLogging
in interface gov.nist.core.StackLogger
public void setBuildTimeStamp(java.lang.String buildTimeStamp)
setBuildTimeStamp
in interface gov.nist.core.StackLogger
buildTimeStamp
- the build time stamp of the jain-sip reference
implementation.public void setStackProperties(java.util.Properties stackProperties)
ServerLogger.setStackProperties(
Properties)
setStackProperties
in interface gov.nist.core.ServerLogger
setStackProperties
in interface gov.nist.core.StackLogger
public void closeLogFile()
ServerLogger.closeLogFile()
closeLogFile
in interface gov.nist.core.ServerLogger
public void logMessage(gov.nist.javax.sip.message.SIPMessage message, java.lang.String from, java.lang.String to, boolean sender, long time)
logMessage
in interface gov.nist.core.ServerLogger
message
- the message to logfrom
- the message senderto
- the message addresseesender
- determines whether we are the origin of this message.time
- the date this message was received at.public void logMessage(gov.nist.javax.sip.message.SIPMessage message, java.lang.String from, java.lang.String to, java.lang.String status, boolean sender, long time)
logMessage
in interface gov.nist.core.ServerLogger
message
- the message to logfrom
- the message senderto
- the message addresseestatus
- message statussender
- determines whether we are the origin of this message.time
- the date this message was received at.public void logMessage(gov.nist.javax.sip.message.SIPMessage message, java.lang.String from, java.lang.String to, java.lang.String status, boolean sender)
logMessage
in interface gov.nist.core.ServerLogger
message
- the message to logfrom
- the message senderto
- the message addresseestatus
- message statussender
- determines whether we are the origin of this message.public void logException(java.lang.Exception exception)
logException
in interface gov.nist.core.ServerLogger
exception
- the Exception we are passed from jain-sip.public void setSipStack(javax.sip.SipStack sipStack)
setSipStack
in interface gov.nist.core.ServerLogger
sipStack
- ignored;public java.lang.String getLoggerName()
getLoggerName
in interface gov.nist.core.StackLogger
public void logTrace(java.lang.String message)
logTrace
in interface gov.nist.core.StackLogger
message
- the trace to log.public java.net.InetSocketAddress getLocalAddressForDestination(java.net.InetAddress dst, int dstPort, java.net.InetAddress localAddress, java.lang.String transport) throws java.io.IOException
dst
- the destination address that the socket would need to connect
to.dstPort
- the port number that the connection would be established
with.localAddress
- the address that we would like to bind on
(null for the "any" address).transport
- the transport that will be used TCP ot TLSjava.io.IOException
- if we fail binding the local socket
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.