def to(self, *args):
if len(args):<EOL><INDENT>self._logFile = args[<NUM_LIT:0>]<EOL>if self._logHandle and self._logHandle != sys.stdout:<EOL><INDENT>self._logHandle.close()<EOL><DEDENT>if isinstance(self._logFile, IOBase):<EOL><INDENT>self._logHandle = self._logFile<EOL><DEDENT>elif self._logFile == '<STR_LIT>':<EOL><INDENT>self._logHandle = sys.stdout<EOL><DEDENT>elif self.socket_parse(self._logFile):<EOL><INDENT>self._logHandle = C_dgmsocket(<EOL>self._socketRemote,<EOL>int(self._socketPort))<EOL><DEDENT>else:<EOL><INDENT>self._logHandle = open(self._logFile, "<STR_LIT:a>")<EOL><DEDENT>self._sys_stdout      = self._logHandle<EOL><DEDENT>else:<EOL><INDENT>return self._logFile<EOL><DEDENT>
get/set the 'device' to which messages are sent.

Valid targets are:

    string filenames:           '/tmp/test.log'
    remote hosts:               'pretoria:1701'
    system devices:             sys.stdout, sys.stderr
    special names:              'stdout'
    file handles:               open('/tmp/test.log')