
import sys, os

def createDirIfNeeded(dirname):
    try:
        os.mkdir(dirname);
    except:
        pass



class ForecastError(Exception):
    """Exception raised for errors in the forecasting process.

    Attributes:
        mReason : explanation of the error
    """

    def __init__(self, reason):
        self.mReason = reason

class InternalForecastError(Exception):
    """Exception raised for errors in the forecasting process.

    Attributes:
        mReason : explanation of the error
    """

    def __init__(self, reason):
        self.mReason = reason



def get_pyaf_logger():
    import logging;
    logger = logging.getLogger('pyaf.std');
    return logger;

def get_pyaf_hierarchical_logger():
    import logging;
    logger = logging.getLogger('pyaf.hierarchical');
    return logger;


import sys, os

def createDirIfNeeded(dirname):
    try:
        os.mkdir(dirname);
    except:
        pass



class ForecastError(Exception):
    """Exception raised for errors in the forecasting process.

    Attributes:
        mReason : explanation of the error
    """

    def __init__(self, reason):
        self.mReason = reason

class InternalForecastError(Exception):
    """Exception raised for errors in the forecasting process.

    Attributes:
        mReason : explanation of the error
    """

    def __init__(self, reason):
        self.mReason = reason



def get_pyaf_logger():
    import logging;
    logger = logging.getLogger('pyaf.std');
    if(logger.handlers == []):
        import logging.config
        logging.basicConfig(level=logging.INFO)        
    return logger;

def get_pyaf_hierarchical_logger():
    import logging;
    logger = logging.getLogger('pyaf.hierarchical');
    return logger;

Enable default logging (not sure if this is OK)
Enable default logging (not sure if this is OK)

  
  import sys, os
  
  def createDirIfNeeded(dirname):
      try:
          os.mkdir(dirname);
      except:
          pass
  
  
  
  class ForecastError(Exception):
      """Exception raised for errors in the forecasting process.
  
      Attributes:
          mReason : explanation of the error
      """
  
      def __init__(self, reason):
          self.mReason = reason
  
  class InternalForecastError(Exception):
      """Exception raised for errors in the forecasting process.
  
      Attributes:
          mReason : explanation of the error
      """
  
      def __init__(self, reason):
          self.mReason = reason
  
  
  
  def get_pyaf_logger():
      import logging;
      logger = logging.getLogger('pyaf.std');
+     if(logger.handlers == []):
+         import logging.config
+         logging.basicConfig(level=logging.INFO)        
      return logger;
  
  def get_pyaf_hierarchical_logger():
      import logging;
      logger = logging.getLogger('pyaf.hierarchical');
      return logger;
  
Enable default logging (not sure if this is OK)
## Code Before:

import sys, os

def createDirIfNeeded(dirname):
    try:
        os.mkdir(dirname);
    except:
        pass



class ForecastError(Exception):
    """Exception raised for errors in the forecasting process.

    Attributes:
        mReason : explanation of the error
    """

    def __init__(self, reason):
        self.mReason = reason

class InternalForecastError(Exception):
    """Exception raised for errors in the forecasting process.

    Attributes:
        mReason : explanation of the error
    """

    def __init__(self, reason):
        self.mReason = reason



def get_pyaf_logger():
    import logging;
    logger = logging.getLogger('pyaf.std');
    return logger;

def get_pyaf_hierarchical_logger():
    import logging;
    logger = logging.getLogger('pyaf.hierarchical');
    return logger;

## Instruction:
Enable default logging (not sure if this is OK)
## Code After:

import sys, os

def createDirIfNeeded(dirname):
    try:
        os.mkdir(dirname);
    except:
        pass



class ForecastError(Exception):
    """Exception raised for errors in the forecasting process.

    Attributes:
        mReason : explanation of the error
    """

    def __init__(self, reason):
        self.mReason = reason

class InternalForecastError(Exception):
    """Exception raised for errors in the forecasting process.

    Attributes:
        mReason : explanation of the error
    """

    def __init__(self, reason):
        self.mReason = reason



def get_pyaf_logger():
    import logging;
    logger = logging.getLogger('pyaf.std');
    if(logger.handlers == []):
        import logging.config
        logging.basicConfig(level=logging.INFO)        
    return logger;

def get_pyaf_hierarchical_logger():
    import logging;
    logger = logging.getLogger('pyaf.hierarchical');
    return logger;
