Added a logger initialization to each module
This commit is contained in:
parent
886c58bb21
commit
7ac32c85b2
@ -20,6 +20,9 @@ from contracts import contract
|
||||
import os
|
||||
import ConfigParser
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# This is the default config, which should not be modified
|
||||
#DEFAILT_CONFIG_PATH = "/etc/neat/neat.conf"
|
||||
|
@ -20,6 +20,9 @@ import sqlalchemy
|
||||
import neat.db
|
||||
# import novaclient
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
new_contract('deque', collections.deque)
|
||||
new_contract('function', lambda x: hasattr(x, '__call__'))
|
||||
|
@ -16,6 +16,9 @@ from contracts import contract
|
||||
from sqlalchemy import *
|
||||
from sqlalchemy.engine.base import Connection
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Database(object):
|
||||
""" A class representing the database, where fields are tables.
|
||||
|
@ -19,6 +19,9 @@ from sqlalchemy import *
|
||||
|
||||
from neat.db import Database
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contract
|
||||
def init_db(sql_connection):
|
||||
|
@ -78,6 +78,9 @@ from novaclient.v1_1 import client
|
||||
from neat.config import *
|
||||
from neat.db_utils import *
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
ERRORS = {
|
||||
400: 'Bad input parameter: incorrect or missing parameters',
|
||||
|
@ -18,6 +18,9 @@
|
||||
from contracts import contract
|
||||
from neat.contracts_extra import *
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contract
|
||||
def best_fit_decreasing_factory(time_step, migration_time, params):
|
||||
|
@ -100,6 +100,9 @@ import neat.common as common
|
||||
from neat.config import *
|
||||
from neat.db_utils import *
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contract
|
||||
def start():
|
||||
|
@ -110,6 +110,9 @@ import neat.common as common
|
||||
from neat.config import *
|
||||
from neat.db_utils import *
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contract
|
||||
def start():
|
||||
|
@ -21,6 +21,9 @@ from neat.contracts_extra import *
|
||||
import nlp
|
||||
from neat.common import frange
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contract
|
||||
def solve2(objective, constraint, step, limit):
|
||||
|
@ -22,6 +22,9 @@ import neat.locals.overload.mhod.multisize_estimation as estimation
|
||||
import neat.locals.overload.mhod.bruteforce as bruteforce
|
||||
from neat.locals.overload.mhod.l_2_states import ls
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contract
|
||||
def init_state(window_sizes, number_of_states):
|
||||
|
@ -18,6 +18,9 @@
|
||||
from contracts import contract
|
||||
from neat.contracts_extra import *
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contract
|
||||
def l0(p_initial, p_matrix, m):
|
||||
|
@ -21,6 +21,9 @@ from neat.contracts_extra import *
|
||||
from itertools import islice
|
||||
from collections import deque
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contract
|
||||
def mean(data, window_size):
|
||||
|
@ -20,6 +20,9 @@ from neat.contracts_extra import *
|
||||
|
||||
import operator
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contract
|
||||
def build_objective(ls, state_vector, p):
|
||||
|
@ -18,6 +18,9 @@
|
||||
from contracts import contract
|
||||
from neat.contracts_extra import *
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contract
|
||||
def otf_factory(time_step, migration_time, params):
|
||||
|
@ -22,6 +22,9 @@ from numpy import median
|
||||
from scipy.optimize import leastsq
|
||||
import numpy as np
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contract
|
||||
def loess_factory(time_step, migration_time, params):
|
||||
|
@ -18,6 +18,9 @@
|
||||
from contracts import contract
|
||||
from neat.contracts_extra import *
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contract
|
||||
def no_migrations_factory(time_step, migration_time, params):
|
||||
|
@ -18,6 +18,9 @@
|
||||
from contracts import contract
|
||||
from neat.contracts_extra import *
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contract
|
||||
def threshold_factory(time_step, migration_time, params):
|
||||
|
@ -21,6 +21,9 @@ from neat.contracts_extra import *
|
||||
from random import choice
|
||||
import operator
|
||||
|
||||
import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@contract
|
||||
def random_factory(time_step, migration_time, params):
|
||||
|
Loading…
x
Reference in New Issue
Block a user