Package dev.themeinerlp.plugindebug
Class DebugBuilder
-
- All Implemented Interfaces:
public final class DebugBuilder
Simple builder to collect debug files and upload them to a custom bytebin server Ex:
<pre class="prettyprint"> DebugBuilder.builder("https://bytebin.lucko.me/")... </pre>
-
-
Method Summary
Modifier and Type Method Description final DebugBuilder
addFile(DebugFile file)
Add a debug file RAW into the debug zip final DebugBuilder
addFile(Path filePath, FileType fileType, String uiTabName)
Add a debug file RAW into the debug zip final DebugBuilder
addText(String text, String uiTabName)
Add a text as a file into the debug zip final DebugBuilder
addJson(String json, String uiTabName)
Add a json string as a file into the debug zip final DebugBuilder
addYAML(String yaml, String uiTabName)
Add a yaml string as a file into the debug zip final DebugUploadResult
upload()
Upload all collected files in a zip with a debug.json to a custom bytebin server. final static DebugBuilder
builder(String uploadServer)
Creates a builder instance with the given bytebin server -
-
Method Detail
-
addFile
final DebugBuilder addFile(DebugFile file)
Add a debug file RAW into the debug zip
-
addFile
final DebugBuilder addFile(Path filePath, FileType fileType, String uiTabName)
Add a debug file RAW into the debug zip
- Parameters:
filePath
- to collect into the zipfileType
- to display in the frontenduiTabName
- to display tn the frontend
-
addText
final DebugBuilder addText(String text, String uiTabName)
Add a text as a file into the debug zip
- Parameters:
text
- to collect into the zipuiTabName
- to display tn the frontend
-
addJson
final DebugBuilder addJson(String json, String uiTabName)
Add a json string as a file into the debug zip
- Parameters:
json
- to collect into the zipuiTabName
- to display tn the frontend
-
addYAML
final DebugBuilder addYAML(String yaml, String uiTabName)
Add a yaml string as a file into the debug zip
- Parameters:
yaml
- to collect into the zipuiTabName
- to display tn the frontend
-
upload
final DebugUploadResult upload()
Upload all collected files in a zip with a debug.json to a custom bytebin server.
-
builder
final static DebugBuilder builder(String uploadServer)
Creates a builder instance with the given bytebin server
- Parameters:
uploadServer
- bytebin server base url
-
-
-
-