Skip to content

Commit

Permalink
storage-mgr: show file content and file size during file creation
Browse files Browse the repository at this point in the history
  • Loading branch information
DenChaykovskiy committed May 8, 2024
1 parent 6b51441 commit d57011c
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ public FileUtils(String path) {
public boolean createFile(String content) {

if (logger.isTraceEnabled())
logger.trace(">>> createFile({})", content);
logger.trace(">>> createFile(<content>)");

logger.debug("... file content (first 20 characters): " + new StringUtils(content).getMaxSubstring(20));
logger.debug("... file size: " + content.length());

File file = new File(path);
file.getParentFile().mkdirs();
Expand Down Expand Up @@ -103,7 +106,10 @@ public boolean createFile(String content) {
public boolean synchroCreateFile(String content, long waitTime, long fileCheckMaxCycles) {

if (logger.isTraceEnabled())
logger.trace(">>> synchroCreateFile({}, {}, {})", content, waitTime, fileCheckMaxCycles);
logger.trace(">>> synchroCreateFile(<content>, {}, {})", waitTime, fileCheckMaxCycles);

logger.debug("... file content (first 20 characters): " + new StringUtils(content).getMaxSubstring(20));
logger.debug("... file size: " + content.length());

StorageFileLocker fileLocker = new StorageFileLocker(path, waitTime, fileCheckMaxCycles);
boolean fileCreatedStatus;
Expand Down

0 comments on commit d57011c

Please sign in to comment.