Commit 46dd0ed8 authored by cmaffeo2's avatar cmaffeo2
Browse files

Added basic configuration for logging

parent 91d0b45b
## Set up loggers
import logging
def _get_username():
import sys
return sys.environ['USER']
return None
logging.basicConfig(format='%(name)s: %(levelname)s: %(message)s')
logger = logging.getLogger(__name__)
_ch = logging.StreamHandler()
_ch.setFormatter(logging.Formatter('%(name)s: %(levelname)s: %(message)s'))
devlogger = logging.getLogger(__name__+'.dev')
# devlogger.setLevel(logging.DEBUG)
if _get_username() not in ('cmaffeo2',):
## Import resources
from pathlib import Path
from .version import get_version
......@@ -8,6 +30,7 @@ _RESOURCE_DIR = Path(__file__).parent / 'resources'
def get_resource_path(relative_path):
return _RESOURCE_DIR / relative_path
## Import useful messsages
from .segmentmodel import SegmentModel, SingleStrandedSegment, DoubleStrandedSegment
from .simulate import multiresolution_simulation
from .model.dna_sequence import read_sequence_file
import logging
import pdb
import subprocess
from pathlib import Path
......@@ -10,6 +11,7 @@ from copy import copy, deepcopy
from .model.nbPot import nbDnaScheme
from . import get_resource_path
from . import logger, devlogger
import re
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment