Skip to content

Commit f7b47f1

Browse files
committed
Review log levels (#1015)
1 parent 571634b commit f7b47f1

File tree

13 files changed

+19
-20
lines changed

13 files changed

+19
-20
lines changed

auth/basic/src/main/java/org/trellisldp/auth/basic/Credentials.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static Credentials parse(final String encoded) {
6767
return new Credentials(parts[0], parts[1]);
6868
}
6969
} catch (final IllegalArgumentException ex) {
70-
LOGGER.warn("Invalid credentials provided: {}", ex.getMessage());
70+
LOGGER.debug("Invalid credentials provided: {}", ex.getMessage());
7171
}
7272
return null;
7373
}

auth/oauth/src/main/java/org/trellisldp/oauth/OAuthFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ private Principal authenticate(final String token) {
129129
} catch (final SecurityException ex) {
130130
LOGGER.debug("Invalid signature, ignoring JWT token: {}", ex.getMessage());
131131
} catch (final JwtException ex) {
132-
LOGGER.warn("Problem reading JWT value: {}", ex.getMessage());
132+
LOGGER.debug("Problem reading JWT value: {}", ex.getMessage());
133133
}
134134
return null;
135135
}

auth/webac/src/main/java/org/trellisldp/webac/WebAcFilter.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -250,50 +250,50 @@ public void filter(final ContainerRequestContext req, final ContainerResponseCon
250250

251251
protected void verifyCanAppend(final Set<IRI> modes, final Session session, final String path) {
252252
if (!modes.contains(ACL.Append) && !modes.contains(ACL.Write)) {
253-
LOGGER.warn("User: {} cannot Append to {}", session.getAgent(), path);
253+
LOGGER.debug("User: {} cannot Append to {}", session.getAgent(), path);
254254
if (AnonymousAgent.equals(session.getAgent())) {
255255
throw new NotAuthorizedException(challenges.get(0),
256256
challenges.subList(1, challenges.size()).toArray());
257257
}
258258
throw new ForbiddenException();
259259
}
260-
LOGGER.debug("User: {} can append to {}", session.getAgent(), path);
260+
LOGGER.trace("User: {} can append to {}", session.getAgent(), path);
261261
}
262262

263263
protected void verifyCanControl(final Set<IRI> modes, final Session session, final String path) {
264264
if (!modes.contains(ACL.Control)) {
265-
LOGGER.warn("User: {} cannot Control {}", session.getAgent(), path);
265+
LOGGER.debug("User: {} cannot Control {}", session.getAgent(), path);
266266
if (AnonymousAgent.equals(session.getAgent())) {
267267
throw new NotAuthorizedException(challenges.get(0),
268268
challenges.subList(1, challenges.size()).toArray());
269269
}
270270
throw new ForbiddenException();
271271
}
272-
LOGGER.debug("User: {} can control {}", session.getAgent(), path);
272+
LOGGER.trace("User: {} can control {}", session.getAgent(), path);
273273
}
274274

275275
protected void verifyCanWrite(final Set<IRI> modes, final Session session, final String path) {
276276
if (!modes.contains(ACL.Write)) {
277-
LOGGER.warn("User: {} cannot Write to {}", session.getAgent(), path);
277+
LOGGER.debug("User: {} cannot Write to {}", session.getAgent(), path);
278278
if (AnonymousAgent.equals(session.getAgent())) {
279279
throw new NotAuthorizedException(challenges.get(0),
280280
challenges.subList(1, challenges.size()).toArray());
281281
}
282282
throw new ForbiddenException();
283283
}
284-
LOGGER.debug("User: {} can write to {}", session.getAgent(), path);
284+
LOGGER.trace("User: {} can write to {}", session.getAgent(), path);
285285
}
286286

287287
protected void verifyCanRead(final Set<IRI> modes, final Session session, final String path) {
288288
if (!modes.contains(ACL.Read)) {
289-
LOGGER.warn("User: {} cannot Read from {}", session.getAgent(), path);
289+
LOGGER.debug("User: {} cannot Read from {}", session.getAgent(), path);
290290
if (AnonymousAgent.equals(session.getAgent())) {
291291
throw new NotAuthorizedException(challenges.get(0),
292292
challenges.subList(1, challenges.size()).toArray());
293293
}
294294
throw new ForbiddenException();
295295
}
296-
LOGGER.debug("User: {} can read {}", session.getAgent(), path);
296+
LOGGER.trace("User: {} can read {}", session.getAgent(), path);
297297
}
298298

299299
static boolean reqAudit(final Prefer prefer) {

components/file/src/main/java/org/trellisldp/file/FileNamespaceService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public boolean setPrefix(final String prefix, final String namespace) {
8282
requireNonNull(namespace, "The namespce value may not be null!");
8383

8484
if (dataRev.containsKey(namespace)) {
85-
LOGGER.warn("A prefix already exists for the namespace: {}", namespace);
85+
LOGGER.debug("A prefix already exists for the namespace: {}", namespace);
8686
return false;
8787
}
8888

components/file/src/main/java/org/trellisldp/file/FileUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public static Stream<Quad> parseQuad(final String line) {
131131
} else if (nodes.size() == 4) {
132132
return of(fromJena(create(nodes.get(3), nodes.get(0), nodes.get(1), nodes.get(2))));
133133
} else {
134-
LOGGER.warn("Skipping invalid data value: {}", line);
134+
LOGGER.debug("Skipping invalid data value: {}", line);
135135
return empty();
136136
}
137137
}

components/jdbc/src/main/java/org/trellisldp/jdbc/DBNamespaceService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public boolean setPrefix(final String prefix, final String namespace) {
8686
handle.execute("INSERT INTO namespaces (prefix, namespace) VALUES (?, ?)", prefix, namespace));
8787
return true;
8888
} catch (final StatementException ex) {
89-
LOGGER.warn("Could not save prefix {} with namespace {}: {}", prefix, namespace, ex.getMessage());
89+
LOGGER.debug("Could not save prefix {} with namespace {}: {}", prefix, namespace, ex.getMessage());
9090
}
9191
}
9292
return false;

core/common/src/main/java/org/trellisldp/common/AcceptDatetime.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private static Instant parseDatetime(final String datetime) {
7878
try {
7979
return parse(datetime.trim(), RFC_1123_DATE_TIME).toInstant();
8080
} catch (final DateTimeException ex) {
81-
LOGGER.warn("Invalid date supplied ({}): {}", datetime, ex.getMessage());
81+
LOGGER.debug("Invalid date supplied ({}): {}", datetime, ex.getMessage());
8282
}
8383
return null;
8484
}

core/common/src/main/java/org/trellisldp/common/Forwarded.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public OptionalInt getPort() {
9999
try {
100100
return OptionalInt.of(Integer.parseInt(port));
101101
} catch (final NumberFormatException ex) {
102-
LOGGER.warn("Could not parse port number: {}", ex.getMessage());
102+
LOGGER.debug("Could not parse port number: {}", ex.getMessage());
103103
}
104104
}
105105
return OptionalInt.empty();

core/common/src/main/java/org/trellisldp/common/Range.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private static int[] parse(final String range) {
8888
return ints;
8989
}
9090
} catch (final NumberFormatException ex) {
91-
LOGGER.warn("Invalid Range request: {}", ex.getMessage());
91+
LOGGER.debug("Invalid Range request: {}", ex.getMessage());
9292
}
9393
}
9494
}

core/common/src/main/java/org/trellisldp/common/Slug.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private static String decodeSlug(final String value) {
7474
try {
7575
return DECODER.decode(value);
7676
} catch (final DecoderException ex) {
77-
LOGGER.warn("Error decoding slug value, ignoring header: {}", ex.getMessage());
77+
LOGGER.debug("Error decoding slug value, ignoring header: {}", ex.getMessage());
7878
}
7979
return null;
8080
}

0 commit comments

Comments
 (0)