Beispiel #1
0
 def __init__(self, name, parent):
     self.counter = 0
     self.parent = parent
     self.name = name
     self.filename = ''
     import log
     self.logChannel = log.GetChannel('Counters.' + self.name)
Beispiel #2
0
 def __init__(self, logChannel = None, bindObject = None):
     logChannelName = self.GetLogChannelName(logChannel, bindObject)
     self.__logname__ = self.GetLogName(logChannelName)
     self.logChannel = log.GetChannel(logChannelName)
     self.LoadPrefs()
     self.logContexts = {}
     for each in ('Info', 'Notice', 'Warn', 'Error'):
         self.logContexts[each] = 'Logging::' + each
Beispiel #3
0
 def Log(self, channelName, flag, *what):
     if self.channels is not None:
         if channelName not in self.channels:
             import log
             self.channels[channelName] = log.GetChannel('nonsvc.' + channelName)
         if self.channels[channelName].IsOpen(flag):
             try:
                 self.channels[channelName].Log(u' '.join(map(unicode, what)).replace('\x00', '\\x00'), flag, 3)
             except:
                 pass
Beispiel #4
0
 def __init__(self, url, filename, statusCallback = None):
     self.url = 'http://' + url.encode('ascii')
     self.localFile = os.path.join(blue.paths.ResolvePath(u'cache:/'), filename.split('/')[-1])
     self.filename = filename
     self.statusCallback = statusCallback
     self.headers = None
     self.file = None
     self.patchFileSize = 0
     self.fileSize = 0
     import log
     self.logChannel = log.GetChannel('svc.patchGrabber')
     self.cancel = 0
Beispiel #5
0
 def __init__(self):
     self.explodeOnRemove = False
     self.exploded = False
     self.model = None
     self.released = False
     self.forceLOD = False
     self.wreckID = None
     self.audioEntities = []
     self.generalAudioEntity = None
     self.boosterAudioEvent = ''
     self.audioPumpStarted = False
     self.logChannel = log.GetChannel(self.__guid__)
     self.modelLoadedEvent = locks.Event()
     self.explosionModel = None
     self.typeID = None
     self.raceID = None
     self.explosionManager = util.ExplosionManager()
def LoadQASettings():
    global _isWrapModeOn
    if boot.role == 'client':
        localizationQASettings['showHardcodedStrings'] = prefs.GetValue(
            'showHardcodedStrings', 0)
        localizationQASettings['showMessageID'] = prefs.GetValue(
            'showMessageID', 0)
        localizationQASettings['enableBoundaryMarkers'] = prefs.GetValue(
            'enableBoundaryMarkers', 0)
        localizationQASettings['characterReplacementMethod'] = prefs.GetValue(
            'characterReplacementMethod', 0)
        localizationQASettings['enableTextExpansion'] = prefs.GetValue(
            'enableTextExpansion', 0)
        _isWrapModeOn = sum(localizationQASettings.values()) > 0
    elif boot.role == 'server' and session:
        localizationServer = sm.GetService('localizationServer')
        if localizationServer:
            return localizationServer.GetLocalizationQASettings()
        logChannel = log.GetChannel('localization')
        logChannel.log(
            'Localization module: Couldnt get localizationServer service so we cannot apply pseudoloc settings.',
            logChannel.flags['ERR'])
    return localizationQASettings
Beispiel #7
0
import uiutil
import os
import yaml
import time
import uthread
import appUtils
import trinity
import bluepy
from service import ROLEMASK_ELEVATEDPLAYER, ROLE_SPAWN, ROLE_WORLDMOD, ROLE_HEALOTHERS, ROLE_GML, ROLE_GMH

SleepSim = blue.pyos.synchro.SleepSim
Yield = blue.pyos.synchro.Yield
Progress = lambda title, text, current, total: sm.GetService(
    'loading').ProgressWnd(title, text, current, total)
OUTPUT_FILE = 'benchmark.yaml'
logChannel = log.GetChannel('Benchmark.Progress')


class Quitter(Exception):
    pass


def Quit(msg=''):
    raise Quitter(msg)


def Log(*args):
    args = ('BMScript:', ) + args
    args = [str(i) for i in args]
    txt = ' '.join(args)
    for line in txt.split('\n'):
Beispiel #8
0
import eveLocalization
import localization
import localizationUtil
import localizationInternalUtil
import uthread
import hashlib
import sys
from service import ROLEMASK_ELEVATEDPLAYER
OFFSET_TEXT = 0
OFFSET_METADATA = 1
OFFSET_TOKENS = 2
IMPORTANT_EN_OVERRIDE = 1
IMPORTANT_EN_TOOLTIP = 2
HIGHLIGHT_IMPORTANT_MARKER = '*'
SYSTEM_LANGUAGE = ''
logChannel = log.GetChannel('Localization')


def LogInfo(*args):
    logChannel.Log('Localization module: ' + ''.join(map(strx, args)),
                   logChannel.flags['INFO'])


def LogWarn(*args):
    logChannel.Log('Localization module: ' + ''.join(map(strx, args)),
                   logChannel.flags['WARN'])


def LogError(*args):
    logChannel.Log('Localization module: ' + ''.join(map(strx, args)),
                   logChannel.flags['ERR'])
Beispiel #9
0
 def __init__(self):
     self.name = 'exefile{}'.format(os.getpid())
     super(ClientBootManager, self).__init__(self.size, self.name)
     log.GetChannel('sharedMemory')
     self.log = log.GetChannel('sharedMemory').Log
Beispiel #10
0
#Embedded file name: c:\depot\games\branches\release\EVE-TRANQUILITY\carbon\common\lib\mlsUtil.py
import sys
import log
import blue
import os
import cPickle
import __builtin__
import types
Log = log.GetChannel('_Mls.General').Log
WARNING_LOG_THRESHOLD = 50
if boot.role != 'client':
    prefs.languageID = 'EN'
    if boot.region == 'optic':
        prefs.languageID = 'ZH'
print 'Multi-Language System: %s using language [%s]' % (boot.role.title(),
                                                         prefs.languageID)
suppressedWarnings = {}
verifiedTranslations = {}
EXPECTED_PACKAGE_VERSION = 1


class LabelWrap(object):
    def __init__(self, languageID):
        self.languageID = languageID

    def __str__(self):
        return 'LabelWrap for ' + self.languageID

    def __getattr__(self, name):
        if self.languageID == 'EN':
            if name in mls.textLabels: