Skip to content

Commit

Permalink
Send log to stderr
Browse files Browse the repository at this point in the history
The default configuration of lsst.log is at DEBUG level sent to
stdout; the default of lsst.pex.logging is at INFO level sent
to stderr.  As the stack is converted to use lsst.log instead of
lsst.pex.logging, it would add extra lines to the outputted
detected-sources file, and fail the comparison.  This commit
configures the log to be similar to the old pex_logging.
  • Loading branch information
Hsin-Fang Chiang committed Sep 7, 2016
1 parent 751fb8b commit a285681
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bin/export-results
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@ import re
import sys
import numpy as np
import lsst.daf.persistence as dafPersist
import lsst.log
from lsst.obs.sdss import SdssMapper
from lsst.afw.geom import Angle


lsst.log.configure_prop("""
log4j.rootLogger=INFO, A1
log4j.appender.A1=ConsoleAppender
log4j.appender.A1.Target=System.err
log4j.appender.A1.layout=PatternLayout
""")

if len(sys.argv) != 2:
print >>sys.stderr, "Usage: export-results <output_directory>"
exit(1);
Expand Down

0 comments on commit a285681

Please sign in to comment.