New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-8357: Changes to move from pex_logging to lsst.log #36
Conversation
@@ -93,8 +92,8 @@ SoftenedLinearPrior::SoftenedLinearPrior(Control const & ctrl) : | |||
"ellipticityMaxOuter must be > 0" | |||
); | |||
} | |||
pex::logging::Debug log("meas.modelfit.SoftenedLinearPrior"); | |||
log.debug<7>("Constructing new SoftenedLinearPrior"); | |||
LOG_LOGGER trace3Logger = LOG_GET("TRACE3:meas.modelfit.SoftenedLinearPrior"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
instead of :
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure where my code developed this ':' instead of the '.' I will fix it.
@@ -75,7 +74,7 @@ TruncatedGaussian TruncatedGaussian::fromSeriesParameters( | |||
) { | |||
static Scalar const LN_2PI = std::log(2.0*M_PI); | |||
static Scalar const SQRT_PI = std::sqrt(M_PI); | |||
pex::logging::Debug debugLog("meas.modelfit.TruncatedGaussian"); | |||
LOG_LOGGER trace4Logger = LOG_GET("TRACE4:meas.modelfit.TruncatedGaussian"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
instead of :
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@@ -191,7 +190,7 @@ TruncatedGaussian TruncatedGaussian::fromStandardParameters( | |||
Vector const & mean, Matrix const & covariance | |||
) { | |||
static Scalar const LN_2PI = std::log(2.0*M_PI); | |||
pex::logging::Debug debugLog("meas.modelfit.TruncatedGaussian"); | |||
LOG_LOGGER trace4Logger = LOG_GET("TRACE4:meas.modelfit.TruncatedGaussian"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
instead of :
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
@@ -38,8 +37,8 @@ double phid(double z) { | |||
} | |||
|
|||
double bvnu(double h, double k, double rho) { | |||
pex::logging::Debug log("meas.modelfit.integrals"); | |||
log.debug<8>("Starting bvnu: h=%g, k=%g, rho=%g", h, k, rho); | |||
LOG_LOGGER trace4Logger = LOG_GET("TRACE4:meas.modelfit.integrals"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
instead of :
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
pex::logging::Debug log("meas.modelfit.optimizer.solveTrustRegion"); | ||
LOG_LOGGER trace5Logger = LOG_GET("TRACE5.meas.modelfit.optimizer.Optimizer"); | ||
LOG_LOGGER trace3Logger = LOG_GET("TRACE3.meas.modelfit.optimizer.Optimizer"); | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This empty line is not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Change the use of the debug<n> macros to instead use a traceLogger Replace the existing log objects with lsst.log.Log.getLogger(component) Change build dependences to lsst.log C++ logging uses lsst.log in place of pex logging for trace levels debuggin: Trace5 = debug<10> Trace4 = debug<8> Trace4 = debug<7> From python, lsst.log.utils.traceSetAt() is used to control trace enabling. traceSetAt(n) n=5,4,3 to be equivalent to setting Debug to 10,8,7 traceSetAt(-1) disables all traces.
3464602
to
cc16a3a
Compare
review