def StartNetworkLogging(self, server, port, threshold):
     """
     Start network logging on this node
     """
     if server and port:
         return blue.EnableNetworkLogging(server, int(port), boot.role,
                                          int(threshold))
Beispiel #2
0
        host = blue.sysinfo.wineHostOs
        if host.startswith('Darwin'):
            platform = u'MacWine'
        else:
            platform = u'Linux'
        blue.SetCrashKeyValues(u'OS', platform)
    else:
        blue.SetCrashKeyValues(u'OS', u'Win')
except RuntimeError:
    pass

logdestination = prefs.ini.GetValue('networkLogging', '')
if logdestination:
    networklogport = prefs.ini.GetValue('networkLoggingPort', 12201)
    networklogThreshold = prefs.ini.GetValue('networkLoggingThreshold', 1)
    blue.EnableNetworkLogging(logdestination, networklogport, boot.role,
                              networklogThreshold)
fileLoggingDirectory = None
fileLoggingThreshold = 0
args = blue.pyos.GetArg()
for arg in args:
    if arg.startswith('/fileLogDirectory'):
        try:
            fileLoggingDirectory = arg.split('=')[1]
        except IndexError:
            fileLoggingDirectory = None

if not fileLoggingDirectory:
    fileLoggingDirectory = prefs.ini.GetValue('fileLogDirectory', None)
    fileLoggingThreshold = int(prefs.ini.GetValue('fileLoggingThreshold', 1))
if fileLoggingDirectory:
    if not hasattr(blue, 'EnableFileLogging'):
Beispiel #3
0
 def StartNetworkLogging(self, server, port, threshold):
     if server and port:
         return blue.EnableNetworkLogging(server, int(port), boot.role,
                                          int(threshold))