Package com.twilio.voice
Class LogParameters.Builder
java.lang.Object
com.twilio.voice.LogParameters.Builder
- Enclosing class:
- LogParameters
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build theLogParameters
objectSet the source filename that generated this log message.Set the method name within which this log message was generated.line
(int line) Set the line number of the log message in the source file.Set theLogModule
that generated this log message.Set the thread name or thread id where the log message is generated.Set a throwable object for logging stack traces.Set the local timestamp.
-
Field Details
-
file
-
-
Constructor Details
-
Builder
Use this Builder object to create aLogParameters
object. Module defaults toLogModule.PLATFORM
. File and function parameters default to empty strings and line number defaults to zero. The current time is used as the timestamp parameter and the current thread's name is used as the thread parameter.- Parameters:
level
-LogLevel
at which this log message was generated. Must not be null.tag
- String tag metadata. Must not be null.message
- Log message text. Must not be null.
-
-
Method Details
-
module
Set theLogModule
that generated this log message. If not set,LogModule.PLATFORM
is used as the default.- Parameters:
module
-LogModule
. Must not be null.- Returns:
LogParameters.Builder
-
timestamp
Set the local timestamp. If not set, the current timestamp is used as the default.- Parameters:
timestamp
- in YY-MM-DD HH:MM:SS.MMM format as a string. Must not be null.- Returns:
LogParameters.Builder
-
file
Set the source filename that generated this log message. If not set, empty string is set as the default.- Parameters:
file
- Source filename. Must not be null.- Returns:
LogParameters.Builder
-
function
Set the method name within which this log message was generated. If not set, empty string is set as the default.- Parameters:
function
- Method name. Must not be null.- Returns:
LogParameters.Builder
-
line
Set the line number of the log message in the source file. If not set, zero is used as the default.- Parameters:
line
- Line number- Returns:
LogParameters.Builder
-
thread
Set the thread name or thread id where the log message is generated. If not set, current thread name or id is used as the default.- Parameters:
thread
- Thread name or id. Must not be null.- Returns:
LogParameters.Builder
-
throwable
Set a throwable object for logging stack traces. If not set, default is null.- Parameters:
tr
- AThrowable
object. May be null.- Returns:
LogParameters.Builder
-
build
Build theLogParameters
object- Returns:
LogParameters
-