~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to MoinMoin/logfile/eventlog.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
 
38
38
        if values is None:
39
39
            values = {}
40
 
        if request.cfg.log_remote_addr and add_http_info:
41
 
            # if cfg.log_remote_addr is False (usually for privacy reasons),
42
 
            # we likely do not want to log user agent and http referer either.
 
40
        if add_http_info:
 
41
            # All these are ascii
43
42
            for key in ['remote_addr', 'http_user_agent', 'http_referer']:
44
43
                value = getattr(request, key, '')
45
44
                if value:
46
45
                    # Save those http headers in UPPERcase
47
46
                    values[key.upper()] = value
48
47
        # Encode values in a query string TODO: use more readable format
49
 
        values = wikiutil.makeQueryString(values)
 
48
        values = wikiutil.makeQueryString(values, want_unicode=True)
50
49
        self._add(u"%d\t%s\t%s\n" % (mtime_usecs, eventtype, values))
51
50
 
52
51
    def parser(self, line):