Package com.newrelic.telemetry.logs
Class Log.LogBuilder
- java.lang.Object
-
- com.newrelic.telemetry.logs.Log.LogBuilder
-
- Enclosing class:
- Log
public static class Log.LogBuilder extends java.lang.Object
A class for holding the variables associated with a Log object and creating a new Log object with those variables.
-
-
Constructor Summary
Constructors Constructor Description LogBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Log.LogBuilder
attributes(Attributes attributes)
Additional attributes associated with the log entry.Log
build()
Create the newLog
entry.Log.LogBuilder
level(java.lang.String logLevel)
The log level (eg.Log.LogBuilder
message(java.lang.String message)
The log line itself.Log.LogBuilder
serviceName(java.lang.String serviceName)
The name of the service which produced this log entry.Log.LogBuilder
throwable(java.lang.Throwable e)
Will assign a throwable to the log entry.Log.LogBuilder
timestamp(long timestamp)
The point in time (ms since UNIX epoch) that the log entry was created.java.lang.String
toString()
-
-
-
Method Detail
-
timestamp
public Log.LogBuilder timestamp(long timestamp)
The point in time (ms since UNIX epoch) that the log entry was created.
-
message
public Log.LogBuilder message(java.lang.String message)
The log line itself.
-
attributes
public Log.LogBuilder attributes(Attributes attributes)
Additional attributes associated with the log entry.
-
serviceName
public Log.LogBuilder serviceName(java.lang.String serviceName)
The name of the service which produced this log entry.
-
level
public Log.LogBuilder level(java.lang.String logLevel)
The log level (eg. INFO, DEBUG, etc) for the log entry.
-
throwable
public Log.LogBuilder throwable(java.lang.Throwable e)
Will assign a throwable to the log entry.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-