mirror of
https://github.com/sismics/docs.git
synced 2024-12-22 11:23:48 +01:00
add more log to debug processing indicator
This commit is contained in:
parent
16fc058264
commit
d9ad69c7ff
@ -152,7 +152,7 @@ public class FileProcessingAsyncListener {
|
||||
} catch (Exception e) {
|
||||
log.error("Error extracting content from: " + file, e);
|
||||
}
|
||||
log.info(MessageFormat.format("File content extracted in {0}ms", System.currentTimeMillis() - startTime));
|
||||
log.info(MessageFormat.format("File content extracted in {0}ms: " + file.getId(), System.currentTimeMillis() - startTime));
|
||||
|
||||
// Save the file to database
|
||||
FileDao fileDao = new FileDao();
|
||||
|
@ -18,6 +18,8 @@ import com.sismics.util.context.ThreadLocalContext;
|
||||
import com.sismics.util.io.InputStreamReaderThread;
|
||||
import com.sismics.util.mime.MimeTypeUtil;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.CipherInputStream;
|
||||
@ -36,6 +38,11 @@ import java.util.*;
|
||||
* @author bgamard
|
||||
*/
|
||||
public class FileUtil {
|
||||
/**
|
||||
* Logger.
|
||||
*/
|
||||
private static final Logger log = LoggerFactory.getLogger(FileUtil.class);
|
||||
|
||||
/**
|
||||
* File ID of files currently being processed.
|
||||
*/
|
||||
@ -211,6 +218,7 @@ public class FileUtil {
|
||||
*/
|
||||
public static void startProcessingFile(String fileId) {
|
||||
processingFileSet.add(fileId);
|
||||
log.info("Processing started for file: " + fileId);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -220,6 +228,7 @@ public class FileUtil {
|
||||
*/
|
||||
public static void endProcessingFile(String fileId) {
|
||||
processingFileSet.remove(fileId);
|
||||
log.info("Processing ended for file: " + fileId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user