-
public class LogParameters.Builder
-
-
Constructor Summary
Constructors Constructor Description LogParameters.Builder(LogLevel level, String tag, String message)Use this Builder object to create a LogParameters object.
-
Method Summary
Modifier and Type Method Description LogParameters.Buildermodule(@NonNull() LogModule module)Set the LogModule that generated this log message. LogParameters.Buildertimestamp(@NonNull() String timestamp)Set the local timestamp. LogParameters.Builderfile(@NonNull() String file)Set the source filename that generated this log message. LogParameters.Builderfunction(@NonNull() String function)Set the method name within which this log message was generated. LogParameters.Builderline(int line)Set the line number of the log message in the source file. LogParameters.Builderthread(String thread)Set the thread name or thread id where the log message is generated. LogParameters.Builderthrowable(Throwable tr)Set a throwable object for logging stack traces. LogParametersbuild()Build the LogParameters object -
-
Constructor Detail
-
LogParameters.Builder
LogParameters.Builder(LogLevel level, String tag, String message)
Use this Builder object to create a LogParameters object.- Parameters:
level- LogLevel at which this log message was generated.tag- String tag metadata.message- Log message text.
-
-
Method Detail
-
module
@NonNull() LogParameters.Builder module(@NonNull() LogModule module)
Set the LogModule that generated this log message. If not set, is used as the default.
- Parameters:
module- LogModule.
-
timestamp
@NonNull() LogParameters.Builder timestamp(@NonNull() String 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.
-
file
@NonNull() LogParameters.Builder file(@NonNull() String file)
Set the source filename that generated this log message. If not set, empty string is setas the default.
- Parameters:
file- Source filename.
-
function
@NonNull() LogParameters.Builder function(@NonNull() String function)
Set the method name within which this log message was generated. If not set, empty stringis set as the default.
- Parameters:
function- Method name.
-
line
LogParameters.Builder line(int line)
Set the line number of the log message in the source file. If not set, zero is used asthe default.
- Parameters:
line- Line number
-
thread
@NonNull() LogParameters.Builder thread(String thread)
Set the thread name or thread id where the log message is generated. If not set, currentthread name or id is used as the default.
- Parameters:
thread- Thread name or id.
-
throwable
@Nullable() LogParameters.Builder throwable(Throwable tr)
Set a throwable object for logging stack traces. If not set, default is null.
- Parameters:
tr- A Throwable object.
-
build
@NonNull() LogParameters build()
Build the LogParameters object
-
-
-
-