Skip to content

Commit

Permalink
Remove log prefix from logging methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Desoroxxx committed Nov 11, 2024
1 parent add8173 commit de64733
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ The method `RedLogger#printFramedError` has been renamed to `RedLogger#logFramed
- `kebab-case`
- `lower_snake_case`
- `UPPER_SNAKE_CASE`
- Added `RedLogger#logFramed` which allows logging lists in a readable manner (e.g., versioning information)
- Added `RedLogger#framed` which allows logging lists in a readable manner (e.g., versioning information)
- Added `DecimalUtils` a utility class which currently allows for truncating decimal numbers for human reading
- Added empty private constructors to hide implicit public ones
- Added `Vector3F` & `Vector2F` to the new experimental vector suite

### Changed

- Improved documentation for `RedLogger#logFramedError`
- Renamed `RedLogger#printFramedError` to `RedLogger#logFramedError`
- Renamed `RedLogger#printFramedError` to `RedLogger#framedError`

### Internal

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public RedLogger(final String modName, final URI newIssueLink, final Logger logg
* @param logLevel The log level at which to log the message.
* @param messages The array of messages to be included within the frame.
*/
public void logFramed(final String title, final Level logLevel, final String... messages) {
public void framed(final String title, final Level logLevel, final String... messages) {
// Create a StringBuilder and add a new line so everything can be aligned
final StringBuilder stringBuilder = new StringBuilder().append("\n");

Expand Down Expand Up @@ -156,11 +156,11 @@ public void logFramed(final String title, final Level logLevel, final String...
* @param whatNow A description of what's happening now.
* @param additionalInformation Optional additional information about the error.
*
* @deprecated Use {@link #logFramedError(String, String, String, String...)} instead.
* @deprecated Use {@link #framedError(String, String, String, String...)} instead.
*/
@Deprecated // TODO: Remove in 0.8
public void printFramedError(final String category, final String whatHappened, final String whatNow, final String... additionalInformation) {
logFramedError(category, whatHappened, whatNow, additionalInformation);
framedError(category, whatHappened, whatNow, additionalInformation);
}

/**
Expand All @@ -176,7 +176,7 @@ public void printFramedError(final String category, final String whatHappened, f
* @param whatNow A description of what's happening now.
* @param additionalInformation Optional additional information about the error.
*/
public void logFramedError(final String category, final String whatHappened, final String whatNow, final String... additionalInformation) {
public void framedError(final String category, final String whatHappened, final String whatNow, final String... additionalInformation) {
// Create a list of formatted text lines containing the descriptions of what happened and what's happening now, as well as optional additional information.
final List<String> formattedTextLines = new ArrayList<>(Collections.singletonList(whatHappened));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static boolean shadersEnabled() {

return (boolean) shaderPackLoadedHandle.invoke();
} catch (Throwable exception) {
RED_LOGGER.logFramedError("OptiNotFine", "Could not get OptiFine shaders status.", "If shaders are enabled things might break", exception.getMessage());
RED_LOGGER.framedError("OptiNotFine", "Could not get OptiFine shaders status.", "If shaders are enabled things might break", exception.getMessage());
return false;
}
}
Expand Down Expand Up @@ -114,7 +114,7 @@ private static void disableFastRender() {
if ((boolean) fastRenderGetterHandle.invoke(mc.gameSettings))
fastRenderSetterHandle.invoke(mc.gameSettings, false);
} catch (Throwable exception) {
RED_LOGGER.logFramedError("OptiNotFine", "Could not disable OptiFine fast renderer", "Things will break", exception.getMessage());
RED_LOGGER.framedError("OptiNotFine", "Could not disable OptiFine fast renderer", "Things will break", exception.getMessage());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public RedLogger(final String modName, final URI newIssueLink, final Logger logg
}

/**
* @deprecated Use {@link dev.redstudio.redcore.logging.RedLogger#logFramedError}
* @deprecated Use {@link dev.redstudio.redcore.logging.RedLogger#framedError}
*/
@Override
@Deprecated
public void printFramedError(final String category, final String whatHappened, final String whatNow, final String... additionalInformation) {
super.logFramedError(category, whatHappened, whatNow, additionalInformation);
super.framedError(category, whatHappened, whatNow, additionalInformation);
}
}

0 comments on commit de64733

Please sign in to comment.