Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static Credentials parse(final String encoded) {
return new Credentials(parts[0], parts[1]);
}
} catch (final IllegalArgumentException ex) {
LOGGER.warn("Invalid credentials provided: {}", ex.getMessage());
LOGGER.debug("Invalid credentials provided: {}", ex.getMessage());
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private Principal authenticate(final String token) {
} catch (final SecurityException ex) {
LOGGER.debug("Invalid signature, ignoring JWT token: {}", ex.getMessage());
} catch (final JwtException ex) {
LOGGER.warn("Problem reading JWT value: {}", ex.getMessage());
LOGGER.debug("Problem reading JWT value: {}", ex.getMessage());
}
return null;
}
Expand Down
16 changes: 8 additions & 8 deletions auth/webac/src/main/java/org/trellisldp/webac/WebAcFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,50 +250,50 @@ public void filter(final ContainerRequestContext req, final ContainerResponseCon

protected void verifyCanAppend(final Set<IRI> modes, final Session session, final String path) {
if (!modes.contains(ACL.Append) && !modes.contains(ACL.Write)) {
LOGGER.warn("User: {} cannot Append to {}", session.getAgent(), path);
LOGGER.debug("User: {} cannot Append to {}", session.getAgent(), path);
if (AnonymousAgent.equals(session.getAgent())) {
throw new NotAuthorizedException(challenges.get(0),
challenges.subList(1, challenges.size()).toArray());
}
throw new ForbiddenException();
}
LOGGER.debug("User: {} can append to {}", session.getAgent(), path);
LOGGER.trace("User: {} can append to {}", session.getAgent(), path);
}

protected void verifyCanControl(final Set<IRI> modes, final Session session, final String path) {
if (!modes.contains(ACL.Control)) {
LOGGER.warn("User: {} cannot Control {}", session.getAgent(), path);
LOGGER.debug("User: {} cannot Control {}", session.getAgent(), path);
if (AnonymousAgent.equals(session.getAgent())) {
throw new NotAuthorizedException(challenges.get(0),
challenges.subList(1, challenges.size()).toArray());
}
throw new ForbiddenException();
}
LOGGER.debug("User: {} can control {}", session.getAgent(), path);
LOGGER.trace("User: {} can control {}", session.getAgent(), path);
}

protected void verifyCanWrite(final Set<IRI> modes, final Session session, final String path) {
if (!modes.contains(ACL.Write)) {
LOGGER.warn("User: {} cannot Write to {}", session.getAgent(), path);
LOGGER.debug("User: {} cannot Write to {}", session.getAgent(), path);
if (AnonymousAgent.equals(session.getAgent())) {
throw new NotAuthorizedException(challenges.get(0),
challenges.subList(1, challenges.size()).toArray());
}
throw new ForbiddenException();
}
LOGGER.debug("User: {} can write to {}", session.getAgent(), path);
LOGGER.trace("User: {} can write to {}", session.getAgent(), path);
}

protected void verifyCanRead(final Set<IRI> modes, final Session session, final String path) {
if (!modes.contains(ACL.Read)) {
LOGGER.warn("User: {} cannot Read from {}", session.getAgent(), path);
LOGGER.debug("User: {} cannot Read from {}", session.getAgent(), path);
if (AnonymousAgent.equals(session.getAgent())) {
throw new NotAuthorizedException(challenges.get(0),
challenges.subList(1, challenges.size()).toArray());
}
throw new ForbiddenException();
}
LOGGER.debug("User: {} can read {}", session.getAgent(), path);
LOGGER.trace("User: {} can read {}", session.getAgent(), path);
}

static boolean reqAudit(final Prefer prefer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public boolean setPrefix(final String prefix, final String namespace) {
requireNonNull(namespace, "The namespce value may not be null!");

if (dataRev.containsKey(namespace)) {
LOGGER.warn("A prefix already exists for the namespace: {}", namespace);
LOGGER.debug("A prefix already exists for the namespace: {}", namespace);
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public static Stream<Quad> parseQuad(final String line) {
} else if (nodes.size() == 4) {
return of(fromJena(create(nodes.get(3), nodes.get(0), nodes.get(1), nodes.get(2))));
} else {
LOGGER.warn("Skipping invalid data value: {}", line);
LOGGER.debug("Skipping invalid data value: {}", line);
return empty();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public boolean setPrefix(final String prefix, final String namespace) {
handle.execute("INSERT INTO namespaces (prefix, namespace) VALUES (?, ?)", prefix, namespace));
return true;
} catch (final StatementException ex) {
LOGGER.warn("Could not save prefix {} with namespace {}: {}", prefix, namespace, ex.getMessage());
LOGGER.debug("Could not save prefix {} with namespace {}: {}", prefix, namespace, ex.getMessage());
}
}
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private static Instant parseDatetime(final String datetime) {
try {
return parse(datetime.trim(), RFC_1123_DATE_TIME).toInstant();
} catch (final DateTimeException ex) {
LOGGER.warn("Invalid date supplied ({}): {}", datetime, ex.getMessage());
LOGGER.debug("Invalid date supplied ({}): {}", datetime, ex.getMessage());
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public OptionalInt getPort() {
try {
return OptionalInt.of(Integer.parseInt(port));
} catch (final NumberFormatException ex) {
LOGGER.warn("Could not parse port number: {}", ex.getMessage());
LOGGER.debug("Could not parse port number: {}", ex.getMessage());
}
}
return OptionalInt.empty();
Expand Down
2 changes: 1 addition & 1 deletion core/common/src/main/java/org/trellisldp/common/Range.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private static int[] parse(final String range) {
return ints;
}
} catch (final NumberFormatException ex) {
LOGGER.warn("Invalid Range request: {}", ex.getMessage());
LOGGER.debug("Invalid Range request: {}", ex.getMessage());
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/common/src/main/java/org/trellisldp/common/Slug.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private static String decodeSlug(final String value) {
try {
return DECODER.decode(value);
} catch (final DecoderException ex) {
LOGGER.warn("Error decoding slug value, ignoring header: {}", ex.getMessage());
LOGGER.debug("Error decoding slug value, ignoring header: {}", ex.getMessage());
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private static Instant parse(final String version) {
try {
return ofEpochSecond(parseLong(version.trim()));
} catch (final NumberFormatException ex) {
LOGGER.warn("Unable to parse version string '{}': {}", version, ex.getMessage());
LOGGER.debug("Unable to parse version string '{}': {}", version, ex.getMessage());
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public ResponseBuilder initialize(final Resource parent, final Resource resource
.entity("Unsupported interaction model provided").type(TEXT_PLAIN_TYPE).build());
} else if (syntax == null) {
// Get the incoming syntax and check that the underlying I/O service supports it
LOGGER.warn("Content-Type: {} not supported", getRequest().getContentType());
LOGGER.debug("Content-Type: {} not supported", getRequest().getContentType());
throw new NotSupportedException();
}
// Check the cache headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ private CompletionStage<ResponseBuilder> handleResourceCreation(final Dataset mu

getAuditQuadData().forEachOrdered(immutable::add);

LOGGER.info("Creating resource");
return handleResourceCreation(metadata, mutable, immutable)
.thenCompose(future -> persistBinaryContent(binary))
.thenCompose(future -> emitEvent(internalId, AS.Create, ldpType))
Expand Down