- 
    
Bug
 - 
    Resolution: Unresolved
 - 
    
P2: Important
 - 
    None
 - 
    5.12.0 Alpha
 - 
    None
 
In qDefaultMessageHandler(), on all other OSes and logging systems we call a <system>_message_handler() function, and those call qFormatLogMessage. But on iOS, qFormatLogMessage() isn't being called: we just directly call AppleUnifiedLogger::messageHandler(type, context, message). So, the output of the app in XCode doesn't have the information which is specified in qSetMessagePattern(). I expected that I could do
    qSetMessagePattern("[%{time process} %{if-debug}D%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}] %{category} %{function} - %{message}");
in main.cpp before creating the QGuiApplication, since setting env variables probably 
 doesn't work. (On desktop OSes, I always set the QT_MESSAGE_PATTERN variable. The calling function %{function} is actually what I need the most though, since the xcode output does have some of the other stuff, like timestamp.)
QTBUG-69450 is the opposite problem, on Android: it was repeating this information. At least the patch helped me figure out where to look.
Maybe AppleUnifiedLogger outputs the type and context somewhere, but not in the XCode output pane.
- relates to
 - 
                    
QTBUG-69450 Logging: wrong android log print
-         
 - Closed
 
 -         
 
| For Gerrit Dashboard: QTBUG-70668 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 240671,2 | iOS: Format log output respecting the message pattern that is set | dev | qt/qtbase | Status: ABANDONED | -1 | 0 |