Skip to content

Commit ce38406

Browse files
committed
ontology: Use debug logs for indexer and loader logs
1 parent 045f306 commit ce38406

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/ubic/basecode/ontology/jena/OntologyIndexer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public static SearchIndex indexOntology( String name, OntModel model, Collection
163163
log.warn( "Index not found, or there was an error, re-indexing {}...", name );
164164
return index( name, model, indexableProperties, excludedFromStemming );
165165
}
166-
log.info( "A valid index for {} already exists, using", name );
166+
log.debug( "A valid index for {} already exists, using", name );
167167
return index;
168168
}
169169

@@ -191,7 +191,7 @@ private static SearchIndex index( String name, OntModel model, Collection<Indexa
191191
private static Directory index( String name, OntModel model, Analyzer analyzer, Path indexDir, Collection<IndexableProperty> indexableProperties ) throws IOException {
192192
StopWatch timer = StopWatch.createStarted();
193193
FSDirectory dir = FSDirectory.open( indexDir.toFile() );
194-
log.info( "Indexing {} to: {}...", name, indexDir );
194+
log.debug( "Indexing {} to: {}...", name, indexDir );
195195
IndexWriterConfig config = new IndexWriterConfig( Version.LUCENE_36, analyzer );
196196
try ( IndexWriter indexWriter = new IndexWriter( dir, config ) ) {
197197
indexWriter.deleteAll(); // start with clean slate.
@@ -228,7 +228,7 @@ private static Directory index( String name, OntModel model, Analyzer analyzer,
228228
indexWriter.addDocument( doc );
229229
}
230230
indexWriter.commit();
231-
log.info( "Done indexing {} subjects of {} in {} s.", indexWriter.numDocs(), name, String.format( "%.2f", timer.getTime() / 1000.0 ) );
231+
log.debug( "Done indexing {} subjects of {} in {} s.", indexWriter.numDocs(), name, String.format( "%.2f", timer.getTime() / 1000.0 ) );
232232
}
233233
return dir;
234234
}

src/ubic/basecode/ontology/jena/OntologyLoader.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public static OntModel loadMemoryModel( String url, @Nullable String cacheName,
129129
// the ontology.
130130
FileUtils.createParentDirectories( oldFile );
131131
Files.copy( f.toPath(), oldFile.toPath(), StandardCopyOption.REPLACE_EXISTING );
132-
log.info( "Load model from disk took {} ms", timer.getTime() );
132+
log.debug( "Load model from disk took {} ms", timer.getTime() );
133133
}
134134
} else {
135135
throw new RuntimeException(
@@ -138,7 +138,7 @@ public static OntModel loadMemoryModel( String url, @Nullable String cacheName,
138138
} else if ( tempFile.exists() ) {
139139
// Model was successfully loaded into memory from URL with given cacheName
140140
// Save cache to disk (rename temp file)
141-
log.info( "Caching ontology to disk: {} under {}", cacheName, f.getAbsolutePath() );
141+
log.debug( "Caching ontology to disk: {} under {}", cacheName, f.getAbsolutePath() );
142142
try {
143143
// Need to compare previous to current so instead of overwriting we'll move the old file
144144
if ( f.exists() ) {
@@ -154,7 +154,7 @@ public static OntModel loadMemoryModel( String url, @Nullable String cacheName,
154154
}
155155
}
156156

157-
log.info( "Loading ontology model for {} took {} ms", url, timer.getTime() );
157+
log.debug( "Loading ontology model for {} took {} ms", url, timer.getTime() );
158158

159159
return model;
160160
}

0 commit comments

Comments
 (0)