Skip to content

Commit

Permalink
Set logging level from INFO to DEBUG to match old behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Nov 24, 2023
1 parent 0c8bebf commit aa20c51
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion jcvi/apps/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def get_logger(name: str):
logger.handlers.clear()
logger.addHandler(RichHandler())
logger.propagate = False
logger.setLevel(logging.INFO)
logger.setLevel(logging.DEBUG)
return logger


Expand Down
6 changes: 2 additions & 4 deletions jcvi/graphics/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
FancyArrowPatch,
FancyBboxPatch,
)
from matplotlib.path import Path
from typing import Optional

from ..apps.base import datadir, glob, listify, logger, sample_N, which
Expand Down Expand Up @@ -313,7 +312,6 @@ def savefig(figname, dpi=150, iopts=None, cleanup=True):
format = "pdf"
try:
logger.debug("Matplotlib backend is: %s", mpl.get_backend())
logger.debug("Attempting save as: %s", figname)
plt.savefig(figname, dpi=dpi, format=format)
except Exception as e:
logger.error("savefig failed with message:\n%s", e)
Expand All @@ -324,9 +322,9 @@ def savefig(figname, dpi=150, iopts=None, cleanup=True):
remove(figname)
sys.exit(1)

msg = "Figure saved to `{0}`".format(figname)
msg = f"Figure saved to `{figname}`"
if iopts:
msg += " {0}".format(iopts)
msg += f" {iopts}"
logger.debug(msg)

if cleanup:
Expand Down
2 changes: 1 addition & 1 deletion jcvi/graphics/synteny.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import numpy as np
import matplotlib.transforms as transforms
from matplotlib.path import Path

from ..apps.base import OptionParser, logger
from ..compara.synteny import BlockFile
Expand All @@ -31,7 +32,6 @@
markup,
plt,
savefig,
Path,
PathPatch,
AbstractLayout,
)
Expand Down

0 comments on commit aa20c51

Please sign in to comment.