Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-60401

Chromium logging integration

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • None
    • WebEngine
    • None

      It'd be nice if it was possible to handle the lines logged by Chromium (for example to include them in application crash reports, or do colorized logging, or other integrations with existing logging system).

      This would probably happen with a mechanism similar to qInstallMessageHandler.

      Looks like Chromium has a way to set up a logging handler:

      // Sets the Log Message Handler that gets passed every log message before
      // it's sent to other log destinations (if any).
      // Returns true to signal that it handled the message and the message
      // should not be sent to other log destinations.
      typedef bool (*LogMessageHandlerFunction)(int severity,
          const char* file, int line, size_t message_start, const std::string& str);
      BASE_EXPORT void SetLogMessageHandler(LogMessageHandlerFunction handler);
      BASE_EXPORT LogMessageHandlerFunction GetLogMessageHandler();
      

      Can stuff like that (marked with BASE_EXPORT) be accessed from QtWebEngine? If so, at some point (when getting a bit more comfortable with C++) I might attempt to contribute a Qt API for this.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt_webengine_team Qt WebEngine Team
            the compiler Florian Bruhin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes