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.ObjectA 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.LogBuilderattributes(Attributes attributes)Logbuild()Log.LogBuilderlevel(java.lang.String logLevel)Log.LogBuildermessage(java.lang.String message)Log.LogBuilderserviceName(java.lang.String serviceName)Log.LogBuilderthrowable(java.lang.Throwable e)Log.LogBuildertimestamp(long timestamp)java.lang.StringtoString()
-
-
-
Method Detail
-
timestamp
public Log.LogBuilder timestamp(long timestamp)
- Parameters:
timestamp- The point in time (ms since UNIX epoch) that the log entry was created.- Returns:
- log builder instance
-
message
public Log.LogBuilder message(java.lang.String message)
- Parameters:
message- The log line itself.- Returns:
- log builder instance
-
attributes
public Log.LogBuilder attributes(Attributes attributes)
- Parameters:
attributes- Additional attributes associated with the log entry.- Returns:
- log builder instance
-
serviceName
public Log.LogBuilder serviceName(java.lang.String serviceName)
- Parameters:
serviceName- The name of the service which produced this log entry.- Returns:
- log builder instance
-
level
public Log.LogBuilder level(java.lang.String logLevel)
- Parameters:
logLevel- The log level (eg. INFO, DEBUG, etc) for the log entry.- Returns:
- log builder instance
-
throwable
public Log.LogBuilder throwable(java.lang.Throwable e)
- Parameters:
e- Will assign a throwable to the log entry.- Returns:
- log builder instance
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-