Skip to content

Commit

Permalink
Bolt only prints error on creating plugin with verbose logging on
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielsherry committed Jun 3, 2024
1 parent 99c732e commit e965435
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public T create() {
s.close();
return plugin;
} catch (IOException e) {
Bolt.logger().log(Level.WARNING, "Could not create plugin instance: " + container.getSourceName(), e);
Bolt.logger().log(Level.FINE, "Could not create plugin instance: " + container.getSourceName(), e);
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public interface PluginDescriptor<T extends BoltPlugin> {
*/
Class<T> getPluginClass();

//TODO create should return Optional<T> rather than sometimes null
T create();

boolean isEnabled();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public static String lineWrap(Component c, String text) {
}

public static String lineWrap(Component c, String text, int width) {
if (text == null || text.isEmpty()) {
return "";
}
if (text.contains("\n")) {
String[] lines = text.split("\n");
StringBuilder sb = new StringBuilder();
Expand Down

0 comments on commit e965435

Please sign in to comment.