Ejemplo n.º 1
0
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.


import sys
import logging
import logging.handlers

import config.orphansubmitterconf as cmconf

import socorrolib.lib.ConfigurationManager as configurationManager
import socorro.storage.orphans as smover
import socorrolib.lib.util as sutil

try:
    config = configurationManager.newConfiguration(configurationModule=cmconf, applicationName="Orphan Submitter")
except configurationManager.NotAnOptionError, x:
    print >>sys.stderr, x
    print >>sys.stderr, "for usage, try --help"
    sys.exit()

logger = logging.getLogger("orphanSubmitter")
logger.setLevel(logging.DEBUG)

sutil.setupLoggingHandlers(logger, config)
sutil.echoConfig(logger, config)

config.logger = logger

try:
    smover.move(config)
Ejemplo n.º 2
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import sys
import logging
import logging.handlers

import config.orphansubmitterconf as cmconf

import socorrolib.lib.ConfigurationManager as configurationManager
import socorro.storage.orphans as smover
import socorrolib.lib.util as sutil

try:
    config = configurationManager.newConfiguration(
        configurationModule=cmconf, applicationName="Orphan Submitter")
except configurationManager.NotAnOptionError, x:
    print >> sys.stderr, x
    print >> sys.stderr, "for usage, try --help"
    sys.exit()

logger = logging.getLogger("orphanSubmitter")
logger.setLevel(logging.DEBUG)

sutil.setupLoggingHandlers(logger, config)
sutil.echoConfig(logger, config)

config.logger = logger

try:
    smover.move(config)
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import socorrolib.lib.ConfigurationManager as cm

testNil = cm.Option()

testSingleCharacter = cm.Option()
testSingleCharacter.singleCharacter = 'T'

testDefault = cm.Option()
testDefault.default = 'default'

testDoc = cm.Option()
testDoc.doc = 'test doc'
Ejemplo n.º 4
0
import sys
import logging
import logging.handlers

import config.submitterconfig as subconf

import socorrolib.lib.ConfigurationManager as configurationManager
import socorro.collector.submitter as sub
import socorrolib.lib.util as sutil

import poster

poster.streaminghttp.register_openers()

try:
    config = configurationManager.newConfiguration(
        configurationModule=subconf, applicationName="submitter 2.0")
except configurationManager.NotAnOptionError, x:
    print >> sys.stderr, x
    print >> sys.stderr, "for usage, try --help"
    sys.exit()

logger = logging.getLogger("submitter")
logger.setLevel(logging.DEBUG)

sutil.setupLoggingHandlers(logger, config)
sutil.echoConfig(logger, config)

config.logger = logger

if config.numberOfSubmissions == 'forever':
    config.iteratorFunc = sub.createInfiniteFileSystemIterator
Ejemplo n.º 5
0
import sys
import logging
import logging.handlers

import config.submitterconfig as subconf

import socorrolib.lib.ConfigurationManager as configurationManager
import socorro.collector.submitter as sub
import socorrolib.lib.util as sutil

import poster

poster.streaminghttp.register_openers()

try:
  config = configurationManager.newConfiguration(configurationModule=subconf,
                                                 applicationName="submitter 2.0")
except configurationManager.NotAnOptionError, x:
  print >>sys.stderr, x
  print >>sys.stderr, "for usage, try --help"
  sys.exit()

logger = logging.getLogger("submitter")
logger.setLevel(logging.DEBUG)

sutil.setupLoggingHandlers(logger, config)
sutil.echoConfig(logger, config)

config.logger = logger

if config.numberOfSubmissions == 'forever':
    config.iteratorFunc = sub.createInfiniteFileSystemIterator
Ejemplo n.º 6
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import web
import socorro.webapi.class_partial as cpart
import socorrolib.lib.ConfigurationManager as cm
import socorro.collector.wsgicollector as wscol
import socorrolib.lib.util as sutil
#import socorro.webapi.hello as hello

import config.collectorconfig as collectorConfig

#-------------------------------------------------------------------------------
config = \
    cm.newConfiguration(configurationModule=collectorConfig,
                                        applicationName="Socorro Collector 3.0")

#-------------------------------------------------------------------------------
import logging
import logging.handlers

logger = logging.getLogger("collector")
logger.setLevel(logging.DEBUG)

syslog = logging.handlers.SysLogHandler(
    address=(config.syslogHost, config.syslogPort),
    facility=config.syslogFacilityString,
)
syslog.setLevel(config.syslogErrorLoggingLevel)
syslogFormatter = logging.Formatter(config.syslogLineFormatString)
syslog.setFormatter(syslogFormatter)