Skip to content

Commit

Permalink
Change logging to trace in Markdown parser to reduce logspam at debug…
Browse files Browse the repository at this point in the history
…-level.
  • Loading branch information
shartte committed Dec 3, 2022
1 parent 9439c2b commit f4a811c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public String sliceSerialize(Token token, boolean expandTabs) {
public void defineSkip(@NotNull Point value) {
tokenizer.columnStart.put(value.line(), value.column());
tokenizer.accountForPotentialSkip();
LOGGER.debug("position: define skip: {}", now());
LOGGER.trace("position: define skip: {}", now());
}

@Override
Expand Down
12 changes: 6 additions & 6 deletions libs/markdown/src/main/java/appeng/libs/micromark/Tokenizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void consume(int code) {
throw new IllegalArgumentException("expected given code to equal expected code");
}

LOGGER.debug("consume: `{}`", code);
LOGGER.trace("consume: `{}`", code);

Assert.check(
!consumed,
Expand All @@ -120,7 +120,7 @@ public void consume(int code) {
pointColumn = 1;
pointOffset += code == Codes.carriageReturnLineFeed ? 2 : 1;
accountForPotentialSkip();
LOGGER.debug("position: after eol: `{}`", now());
LOGGER.trace("position: after eol: `{}`", now());
} else if (code != Codes.virtualSpace) {
pointColumn++;
pointOffset++;
Expand Down Expand Up @@ -158,7 +158,7 @@ public Token enter(String type, Token fields) {
token.type = type;
token.start = now();

LOGGER.debug("enter: '{}'", type);
LOGGER.trace("enter: '{}'", type);

context.getEvents().add(new Event(EventType.ENTER, token, context));

Expand Down Expand Up @@ -188,7 +188,7 @@ public Token exit(String type) {
"expected non-empty token (`" + type + "`)"
);

LOGGER.debug("exit: '{}'", token.type);
LOGGER.trace("exit: '{}'", token.type);
context.getEvents().add(Event.exit(token, context));

return token;
Expand Down Expand Up @@ -271,7 +271,7 @@ void go(int code) {
throw new IllegalStateException("expected character to be consumed");
}
consumed = false;
LOGGER.debug("main: passing `{}` to {}", code, state);
LOGGER.trace("main: passing `{}` to {}", code, state);
expectedCode = code;
if (state == null) {
throw new IllegalStateException("expected state");
Expand Down Expand Up @@ -472,7 +472,7 @@ Info store() {
ListUtils.setLength(context.getEvents(), startEventsIndex);
stack = startStack;
accountForPotentialSkip();
LOGGER.debug("position: restore: '{}'", now());
LOGGER.trace("position: restore: '{}'", now());
},
startEventsIndex
);
Expand Down

0 comments on commit f4a811c

Please sign in to comment.