Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [Solved] Redirecting log messages

    QML and Qt Quick
    2
    2
    2789
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      situ117 last edited by

      Hello,

      Is there any way to catch all console.log() messages through QML. By default all logged messages are printed on terminal. What if I want to log these messages to a file. (not by using UNIX redirection operators, consider a scenario where I'm running my app on cellphone.)

      1 Reply Last reply Reply Quote 0
      • A
        andre last edited by

        Just use the standard Qt way to re-direct log messages (qInstallMsgHandler, look it up in the docs).

        1 Reply Last reply Reply Quote 1
        • First post
          Last post