Changeset d9df833 in sasview


Ignore:
Timestamp:
Apr 10, 2017 2:08:04 AM (8 years ago)
Author:
wojciech
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
7fb59b2
Parents:
0719c8c
Message:

Code clean-up for logger

File:
1 edited

Legend:

Unmodified
Added
Removed
  • run.py

    r0719c8c rd9df833  
    3636    os.environ['PYTHONPATH'] = PYTHONPATH 
    3737    sys.path.insert(0, path) 
    38  
    39 root = abspath(dirname(__file__)) 
    40 addpath(joinpath(root, 'sasview')) 
    41 from logger_config import SetupLogger 
    42  
    43 #try: 
    44 #    # running from a local computer as developer 
    45 #    from sasview.logger_config import SetupLogger 
    46 #except ImportError: 
    47 #    from logger_config import SetupLogger 
    48  
    49 l = SetupLogger(__name__) 
    50 logger = l.config_development() 
    5138 
    5239@contextmanager 
     
    154141 
    155142if __name__ == "__main__": 
     143    #Need to add absolute path before actual prepare call, 
     144    #so logging can be done during initialization process too 
     145    root = abspath(dirname(__file__)) 
     146    addpath(joinpath(root, 'sasview')) 
     147    from logger_config import SetupLogger 
     148    logger = SetupLogger(__name__).config_development() 
     149 
    156150    logger.debug("Starting SASVIEW in debug mode.") 
    157151    prepare() 
Note: See TracChangeset for help on using the changeset viewer.