update format for messages in logging
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 43s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 43s
This commit is contained in:
parent
45bfae281e
commit
ee138cb5a9
@ -56,6 +56,15 @@ public class LogFeature extends Feature {
|
||||
* @return the formatted content
|
||||
*/
|
||||
public String formatContent(String content) {
|
||||
return content.length() > 512 ? PasteUtils.uploadPaste(content).getUrl() : "\n```\n%s\n```".formatted(content);
|
||||
if (content == null) {
|
||||
return "No content";
|
||||
}
|
||||
if (content.length() > 512) {
|
||||
return "Content too long, [click here to view]("+PasteUtils.uploadPaste(content)+")";
|
||||
}
|
||||
if (content.length() <= 32) {
|
||||
return "`%s`".formatted(content);
|
||||
}
|
||||
return "\n```\n%s\n```".formatted(content);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user