Git Product home page Git Product logo

Comments (3)

mwcraig avatar mwcraig commented on July 18, 2024

Can you please provide an example that demonstrates the problem? At first glance, at least, I'm not seeing any place in ccdproc that uses the root logger.

from ccdproc.

JuanCab avatar JuanCab commented on July 18, 2024

Well, here is a code that works for me (assuming test_dir points to a directory with FITS images):

import logging
from ccdproc import ImageFileCollection

print(f"There a root handler? {logging.root.hasHandlers()}")

logger=logging.getLogger("__main__")
print(f"There a root handler? {logging.root.hasHandlers()}")

ifc = ImageFileCollection("./exoplanet-project/")
print(f"There a root handler? {logging.root.hasHandlers()}")

On my system, running as the first command in ipython, I get:

There a root handler? False
There a root handler? False
There a root handler? True

from ccdproc.

JuanCab avatar JuanCab commented on July 18, 2024

Just for humor's sake, try setting the level of the logger you create. When I create a handler, I do all this:

logger = logging.getLogger("multi_image_photometry")
logger(logging.INFO)
console_format = logging.Formatter('%(message)s')
fh = logging.StreamHandler()
fh.setFormatter(console_format)
fh.setLevel(logging.INFO)   # Set the individual handler's response level
logger.addHandler(fh)

Not sure if that somehow decouples it from the root handler, since you are not just using the default settings (from root).

from ccdproc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.