public class LogBlock extends Object
Constructor and Description |
---|
LogBlock(String uuid)
Given a universally unique identifier as string construct a logging context.
|
Modifier and Type | Method and Description |
---|---|
protected void |
add(Class<? extends LogInfo> phaseClass)
Add an entry of given class in this LogBlock that holds no information.
|
void |
add(LogInfo phase)
Append a part of logging information defined in this LogBlock.
|
Map<String,LogInfo> |
any()
JSON serialization-focused getter that will "un wrap" the map, making it's entries appear to be those of the
parent class.
|
LogInfo |
get(String name)
Return a part of logging information in this LogBlock.
|
LogBlock |
withUuid(String uuid)
Create a new LogBlock with the same body but updated uuid.
|
public final String uuid
public LogBlock(String uuid)
uuid
- A string identifier that is meant to be unique across the logfile.public void add(LogInfo phase)
phase
- A LogInfo
object including the information to be logged.public LogInfo get(String name)
name
- Name of a LogInfo
object to be returnedpublic LogBlock withUuid(String uuid)
uuid
- New uuid.protected void add(Class<? extends LogInfo> phaseClass)
LogInfo
parts inside a LogBlock.phaseClass
- A string to identify the class that will hold the logs passed as arguments.Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.