Skip to content

Commit

Permalink
Log errors to stderr instead of stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
atextor committed Aug 17, 2021
1 parent d3669a6 commit eef4ec0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions cli/src/main/java/de/atextor/owlcli/LoggingMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public void configureLoggers() {
final ConsoleAppender<ILoggingEvent> appender = new ConsoleAppender<>();
appender.setName( "ConsoleLogger" );
appender.setContext( loggerContext );
appender.setTarget( "System.err" );

final ThresholdFilter filter = new ThresholdFilter();
filter.setLevel( level.toString() );
Expand Down
3 changes: 2 additions & 1 deletion cli/src/main/java/de/atextor/owlcli/OWLCLIWriteCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class OWLCLIWriteCommand extends AbstractCommand implements Runnable {
@CommandLine.Mixin
LoggingMixin loggingMixin;

@CommandLine.Option( names = { "-o", "--out" },
@CommandLine.Option( names = { "-o", "--output" },
description = "Output file format, one of ${COMPLETION-CANDIDATES} (Default: ${DEFAULT-VALUE})" )
private Configuration.Format outputFormat = config.outputFormat;

Expand Down Expand Up @@ -193,6 +193,7 @@ public void run() {
.predicateOrder( predicateOrder )
.objectOrder( objectOrder )
.anonymousNodeIdGenerator( buildAnonymousNodeIdGenerator( anonymousNodeIdPattern ) )
.knownPrefixes( buildKnownPrefixes( prefixMap ) )
.build();

final Configuration.ConfigurationBuilder configurationBuilder = Configuration.builder()
Expand Down

0 comments on commit eef4ec0

Please sign in to comment.