Back to index

unity  6.0.0
Functions | Variables
unity.emulators.unity Namespace Reference

Functions

def start_log_to_file
def reset_logging
def set_log_severity
def log_unity_message

Variables

string UNITY_BUS_NAME = 'com.canonical.Unity'
string DEBUG_PATH = '/com/canonical/Unity/Debug'
string LOGGING_IFACE = 'com.canonical.Unity.Debug.Logging'
tuple _debug_proxy_obj = session_bus.get_object(UNITY_BUS_NAME, DEBUG_PATH)
tuple _logging_iface = Interface(_debug_proxy_obj, LOGGING_IFACE)

Function Documentation

def unity.emulators.unity.log_unity_message (   severity,
  message 
)
Instruct unity to log a message for us.

severity: one of ('TRACE', 'DEBUG', 'INFO', 'WARNING', 'ERROR').

message: The message to log.

For debugging purposes only! If you want to log a message during an autopilot
test, use the python logging framework instead.

Definition at line 45 of file unity.py.

00045 
00046 def log_unity_message(severity, message):
00047     """Instruct unity to log a message for us.
00048 
00049     severity: one of ('TRACE', 'DEBUG', 'INFO', 'WARNING', 'ERROR').
00050 
00051     message: The message to log.
00052 
00053     For debugging purposes only! If you want to log a message during an autopilot
00054     test, use the python logging framework instead.
00055 
00056     """
00057     _logging_iface.LogMessage(severity, message)
00058 

Here is the caller graph for this function:

Instruct Unity to stop logging to a file.

Definition at line 29 of file unity.py.

00029 
00030 def reset_logging():
00031     """Instruct Unity to stop logging to a file."""
00032     _logging_iface.ResetLogging()
00033 

Here is the caller graph for this function:

def unity.emulators.unity.set_log_severity (   component,
  severity 
)
Instruct Unity to set a log component's severity.

'component' is the unity logging component name.

'severity' is the severity name (like 'DEBUG', 'INFO' etc.)

Definition at line 34 of file unity.py.

00034 
00035 def set_log_severity(component, severity):
00036     """Instruct Unity to set a log component's severity.
00037 
00038     'component' is the unity logging component name.
00039 
00040     'severity' is the severity name (like 'DEBUG', 'INFO' etc.)
00041 
00042     """
00043     _logging_iface.SetLogSeverity(component, severity)
00044 

Here is the caller graph for this function:

Instruct Unity to start logging to the given file.

Definition at line 24 of file unity.py.

00024 
00025 def start_log_to_file(file_path):
00026     """Instruct Unity to start logging to the given file."""
00027     _logging_iface.StartLogToFile(file_path)
00028 

Here is the caller graph for this function:


Variable Documentation

Definition at line 21 of file unity.py.

Definition at line 22 of file unity.py.

string unity.emulators.unity.DEBUG_PATH = '/com/canonical/Unity/Debug'

Definition at line 17 of file unity.py.

string unity.emulators.unity.LOGGING_IFACE = 'com.canonical.Unity.Debug.Logging'

Definition at line 18 of file unity.py.

string unity.emulators.unity.UNITY_BUS_NAME = 'com.canonical.Unity'

Definition at line 16 of file unity.py.