more logs

This commit is contained in:
Alexey Kudravtsev
2015-08-14 18:05:27 +03:00
parent f4bbec5b07
commit d2a8f3042b
@@ -60,10 +60,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.TestOnly;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.*;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.*;
@@ -672,6 +669,13 @@ public class FileTypeManagerImpl extends FileTypeManagerEx implements Persistent
int n = newStream.read(buffer, 0, buffer.length);
newStream.close();
log("F: Redetect run for file: " + file.getName() + "; result: "+fileType.getName()+"; processor ret: "+r+"; stream: "+inputStream+"; newStream: "+newStream+"; read: "+n+"; buffer: "+Arrays.toString(buffer));
try {
InputStream in = ReflectionUtil.getField(newStream.getClass(), newStream, InputStream.class, "in");
String path = ReflectionUtil.getField(in.getClass(), in, String.class, "path");
log("F: inputStream.in: " + in + "("+in.getClass()+"; in.path: "+path+"; path.exists "+new File(path).exists()+"; canRead: "+new File(path).canRead());
}
catch (Exception ignored) {
}
}
if (LOG.isDebugEnabled()) {