Commits

German Larrain committed d782db5

added logging support to some modules, to replace usage of `print`

  • Participants
  • Parent commits 3d09a4c

Comments (0)

Files changed (5)

ars/app/__init__.py

 
 """
 from abc import abstractmethod
+import logging
 
 from .. import exceptions as exc
 from ..graphics import vtk_adapter as gp
 from ..model.simulator import Simulation, signals
 
 
+logger = logging.getLogger(__name__)
+
+
 class Program(object):
 
 	"""Main class of ARS.

ars/model/collision/base.py

 
 """
 from abc import ABCMeta, abstractmethod
+import logging
 
 from ... import exceptions as exc
 from ...lib.pydispatch import dispatcher
 
 from . import signals
 
+
+logger = logging.getLogger(__name__)
+
 #==============================================================================
 # Environment
 #==============================================================================

ars/model/collision/ode_adapter.py

 
 """
 from abc import ABCMeta
+import logging
 
 import ode
 
 from . import ode_objects_factories
 from .base import NearCallbackArgs
 
+
+logger = logging.getLogger(__name__)
+
 #==============================================================================
 # Environment
 #==============================================================================

ars/model/robot/sensors.py

 
 """
 from abc import ABCMeta, abstractmethod
+import logging
 
 from ...lib.pydispatch import dispatcher
 from ...model.collision import ode_adapter as coll
 
 from . import signals
 
+
+logger = logging.getLogger(__name__)
+
 #==============================================================================
 # Abstract classes
 #==============================================================================

ars/model/simulator/__init__.py

 from abc import ABCMeta, abstractmethod
+import logging
 
 from ...constants import G_VECTOR
 from ...lib.pydispatch import dispatcher
 from . import signals
 
 
+logger = logging.getLogger(__name__)
+
+
 class Simulation(object):
 
 	def __init__(self, FPS, STEPS_PF):