[java-opensaml] 02/04: Put log prefix back.
Scott Cantor
cantor.2 at osu.edu
Fri Apr 3 13:47:02 EDT 2020
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch dev/OSJ-246
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=afa5c05ef7170788a98451dc66807e49d4130316
commit afa5c05ef7170788a98451dc66807e49d4130316
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Apr 2 15:38:58 2020 -0400
Put log prefix back.
---
.../opensaml/storage/impl/client/ClientStorageService.java | 2 +-
.../storage/impl/client/JSONClientStorageServiceStore.java | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageService.java b/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageService.java
index 14f93ef..b6d1c89 100644
--- a/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageService.java
+++ b/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/ClientStorageService.java
@@ -509,7 +509,7 @@ public class ClientStorageService extends AbstractMapBackedStorageService implem
*
* @return logging prefix
*/
- @Nonnull @NotEmpty private String getLogPrefix() {
+ @Nonnull @NotEmpty String getLogPrefix() {
return "StorageService " + getId() + ":";
}
diff --git a/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/JSONClientStorageServiceStore.java b/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/JSONClientStorageServiceStore.java
index da9074a..60ee2c5 100644
--- a/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/JSONClientStorageServiceStore.java
+++ b/opensaml-storage-impl/src/main/java/org/opensaml/storage/impl/client/JSONClientStorageServiceStore.java
@@ -114,12 +114,12 @@ public class JSONClientStorageServiceStore extends AbstractClientStorageServiceS
throws IOException {
if (!isDirty()) {
- log.trace("Storage state has not been modified, save operation skipped");
+ log.trace("{} Storage state has not been modified, save operation skipped", storageService.getLogPrefix());
return null;
}
if (getContextMap().isEmpty()) {
- log.trace("Data is empty");
+ log.trace("{} Data is empty", storageService.getLogPrefix());
return new ClientStorageServiceOperation(storageService.getId(), storageService.getStorageName(), null,
getSource());
}
@@ -157,19 +157,19 @@ public class JSONClientStorageServiceStore extends AbstractClientStorageServiceS
gen.writeEnd().close();
if (empty) {
- log.trace(" Data is empty");
+ log.trace("{} Data is empty", storageService.getLogPrefix());
return new ClientStorageServiceOperation(storageService.getId(), storageService.getStorageName(), null,
getSource());
}
final String raw = sink.toString();
- log.trace("Size of data before encryption is {}", raw.length());
- log.trace("Data before encryption is {}", raw);
+ log.trace("{} Size of data before encryption is {}", raw.length(), storageService.getLogPrefix());
+ log.trace("{} Data before encryption is {}", raw, storageService.getLogPrefix());
try {
final String wrapped = storageService.getDataSealer().wrap(raw,
exp > 0 ? Instant.ofEpochMilli(exp) : Instant.now().plus(Duration.ofDays(1)));
- log.trace("Size of data after encryption is {}", wrapped.length());
+ log.trace("{} Size of data after encryption is {}", wrapped.length(), storageService.getLogPrefix());
setDirty(false);
return new ClientStorageServiceOperation(storageService.getId(), storageService.getStorageName(),
wrapped, getSource());
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list