Skip to content

Commit

Permalink
Add prefix to C++ logger
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Nov 8, 2021
1 parent ea7d219 commit 663d35d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/CR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -574,10 +574,10 @@ std::vector<std::shared_ptr<afw::detection::Footprint>> findCosmicRays(
// find the sum of pixel values within the CR
(*cr)->getSpans()->applyFunctor(CountDN, *mimage.getImage());

LOGL_DEBUG("TRACE4.algorithms.CR", "CR at (%d, %d) has %g DN", (*cr)->getBBox().getMinX(),
LOGL_DEBUG("TRACE4.lsst.algorithms.CR", "CR at (%d, %d) has %g DN", (*cr)->getBBox().getMinX(),
(*cr)->getBBox().getMinY(), CountDN.getCounts());
if (CountDN.getCounts() < minDn) { /* not bright enough */
LOGL_DEBUG("TRACE5.algorithms.CR", "Erasing CR");
LOGL_DEBUG("TRACE5.lsst.algorithms.CR", "Erasing CR");

cr = CRs.erase(cr);
--cr; // back up to previous CR (we're going to increment it)
Expand All @@ -591,7 +591,7 @@ std::vector<std::shared_ptr<afw::detection::Footprint>> findCosmicRays(
*/
bool const debias_values = true;
bool grow = false;
LOGL_DEBUG("TRACE2.algorithms.CR", "Removing initial list of CRs");
LOGL_DEBUG("TRACE2.lsst.algorithms.CR", "Removing initial list of CRs");
removeCR(mimage, CRs, bkgd, crBit, saturBit, badMask, debias_values, grow);
#if 0 // Useful to see phase 2 in display; debugging only
(void)setMaskFromFootprintList(mimage.getMask().get(), CRs,
Expand All @@ -607,7 +607,7 @@ std::vector<std::shared_ptr<afw::detection::Footprint>> findCosmicRays(
bool too_many_crs = false; // we've seen too many CR pixels
int nextra = 0; // number of pixels added to list of CRs
for (int i = 0; i != niteration && !too_many_crs; ++i) {
LOGL_DEBUG("TRACE1.algorithms.CR", "Starting iteration %d", i);
LOGL_DEBUG("TRACE1.lsst.algorithms.CR", "Starting iteration %d", i);
for (std::vector<std::shared_ptr<afw::detection::Footprint>>::iterator fiter = CRs.begin();
fiter != CRs.end(); fiter++) {
std::shared_ptr<afw::detection::Footprint> cr = *fiter;
Expand Down Expand Up @@ -709,7 +709,7 @@ std::vector<std::shared_ptr<afw::detection::Footprint>> findCosmicRays(
} else {
if (true || nextra > 0) {
grow = true;
LOGL_DEBUG("TRACE2.algorithms.CR", "Removing final list of CRs, grow = %d", grow);
LOGL_DEBUG("TRACE2.lsst.algorithms.CR", "Removing final list of CRs, grow = %d", grow);
removeCR(mimage, CRs, bkgd, crBit, saturBit, badMask, debias_values, grow);
}
/*
Expand Down Expand Up @@ -919,7 +919,7 @@ class RemoveCR {
* estimate
*/
if (ngood > 0) {
LOGL_DEBUG("TRACE3.algorithms.CR", "Adopted min==%g at (%d, %d) (ngood=%d)",
LOGL_DEBUG("TRACE3.lsst.algorithms.CR", "Adopted min==%g at (%d, %d) (ngood=%d)",
static_cast<double>(min), x, y, ngood);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test_cr.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import lsst.utils.tests

# Increase the number for more verbose messages
logUtils.traceSetAt("algorithms.CR", 3)
logUtils.traceSetAt("lsst.algorithms.CR", 3)

try:
display
Expand Down

0 comments on commit 663d35d

Please sign in to comment.