'Twisted-enabled wrapper around L{warnings.showwarning}.
If C{file} is L{None}, the default behaviour is to emit the warning to
the log system, otherwise the original L{warnings.showwarning} Python
function is called.
@param message: A warning message to emit.
@type message: L{str}
@param category: A warning category to associate with C{message}.
@type category: L{warnings.Warning}
@param filename: A file name for the source code file issuing the
warning.
@type warning: L{str}
@param lineno: A line number in the source file where the warning was
issued.
@type lineno: L{int}
@param file: A file to write the warning message to.  If L{None},
write to L{sys.stderr}.
@type file: file-like object
@param line: A line of source code to include with the warning message.
If L{None}, attempt to read the line from C{filename} and
C{lineno}.
@type line: L{str}'

def showwarning(self, message, category, filename, lineno, file=None, line=None):

    if (file is None):
        self._log.warn('{filename}:{lineno}:    {category}:    {warning}', warning=message, category=qual(category), filename=filename, lineno=lineno)
    else:
        self._oldshowwarning(message, category, filename, lineno, file, line)
