Пример #1
0
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
#   02110-1301  USA

""" Module for configuring test logging. """

__revision__ = "$Revision$"

from wuja.log import setup_logging

import logging

# Configure logging: (needs to be done before importing our modules)
log_conf_locations = ["./logging.conf", "./test/logging.conf",
    "../../test/logging.conf", "../test/logging.conf"]
setup_logging(log_conf_locations)

logger = logging.getLogger("configureLogging")
logger.debug("Configured logging.")

Пример #2
0
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
#   02110-1301  USA

"""
Thin script to run wuja from the source directory. (and not the installed
version.
"""

__revision__ = "$Revision"

import sys
sys.path.insert(0, './src/')

from wuja.log import setup_logging
# Configure logging: (needs to be done before importing our modules)
confFileLocations = ["~/.wuja/logging.conf", "./logging.conf"]
setup_logging(confFileLocations)

from wuja.application import WujaApplication

if __name__ == "__main__":
    wujaApp = WujaApplication()
    wujaApp.main()