disable solr log writing in release build

This commit is contained in:
adam-m 2012-09-13 13:25:40 -04:00
parent f31a5eea46
commit aa5099fcd3

View File

@ -211,14 +211,16 @@ class Server {
public void run() { public void run() {
InputStreamReader isr = new InputStreamReader(stream); InputStreamReader isr = new InputStreamReader(stream);
BufferedReader br = new BufferedReader(isr); BufferedReader br = new BufferedReader(isr);
final Version.Type builtType = Version.getBuildType();
try { try {
OutputStreamWriter osw = new OutputStreamWriter(out, PlatformUtil.getDefaultPlatformCharset()); OutputStreamWriter osw = new OutputStreamWriter(out, PlatformUtil.getDefaultPlatformCharset());
BufferedWriter bw = new BufferedWriter(osw); BufferedWriter bw = new BufferedWriter(osw);
String line = null; String line = null;
while (doRun && (line = br.readLine()) != null) { while (doRun && (line = br.readLine()) != null) {
bw.write(line); if (builtType == Version.Type.DEVELOPMENT) {
bw.newLine(); bw.write(line);
if (Version.getBuildType() == Version.Type.DEVELOPMENT) { bw.newLine();
//if (builtType == Version.Type.DEVELOPMENT) {
//flush buffers if dev version for debugging //flush buffers if dev version for debugging
bw.flush(); bw.flush();
} }
@ -398,9 +400,9 @@ class Server {
return currentCore.queryNumIndexedFiles(); return currentCore.queryNumIndexedFiles();
} }
/** /**
* Execute query that gets only number of all Solr file chunks (not logical files) indexed without * Execute query that gets only number of all Solr file chunks (not logical
* actually returning the content. * files) indexed without actually returning the content.
* *
* @return int representing number of indexed chunks * @return int representing number of indexed chunks
* @throws SolrServerException * @throws SolrServerException
@ -676,9 +678,9 @@ class Server {
return queryNumIndexedDocuments() - queryNumIndexedChunks(); return queryNumIndexedDocuments() - queryNumIndexedChunks();
} }
/** /**
* Execute query that gets only number of all chunks (not logical files, or all documents) * Execute query that gets only number of all chunks (not logical files,
* indexed without actually returning the content * or all documents) indexed without actually returning the content
* *
* @return int representing number of indexed chunks * @return int representing number of indexed chunks
* @throws SolrServerException * @throws SolrServerException