You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide severity, categories and account IDs in log files #5647
Use Qt categorized logging to improve the readability and grepability of client log files
It should be possible to filter by category and severity to control the size of log files a bit (using Qt environment variables or command line arguments)
Try to make sync protocol events easy to find (special category) in the log to provide a replacement for .owncloudsync.log
A bit of changes to log window could also be implied, either add some filtering/search options, or removing it altogether in favor of enabling file logging and opening the file explorer in the right folder when F12 is pressed.
Not yet decided. I suppose X-OC-RequestId makes sense? Lets ask the Internet ...
It seems Heroku allows clients to send a request id in the X-Request-ID header. That of course makes sense because the client can then already log the id even when the server fails to respond. I think this maskes more sense then letting the server generate the uuid. That might be a fallback in case no X-Request-ID header has been sent: RequestHeader setifempty X-Request-ID %{UNIQUE_ID}e in the .htaccess and in oc core we then only check X-Request-ID (see https://serverfault.com/a/797611).
I really like this whole logging concept, it's way cleaner than the previous one and super handy when it comes to track down flows and issues with them. 🎉 😊
It'd be really useful to provide checkboxes with the categories on the bottom part of the Log Output window to filter error/warnings and discard info messages and avoid some noise - the same I do with the Search function but limiting the info dumped to those categories (i.e. like the Capture debug messages opt.)
@michaelstingl pointed me today at some cases where it would also be useful to have some bits of info from every network request sent/received (redirections, SAML stuff...) - we can discuss it in the near future.
At least on OS X the Capture debug messages prints the same qt.qpa.cocoa.window messages in loop every few ms. Could we have them only when some change is made?. e.g.
About the debug messages, right now it just outputs everything, including all Qt messages. In this mode you shouldn't expect any kind of conciseness, it's only to see if you missed anything and can be filtered in an editor or to know which logging rules to apply to get what you want.
We could add an option to set the filter rules in the log window, but the feedback I got is that many people use log files instead, or log to the console, so I would suggest that you try setting the QT_LOGGING_RULES environment variable yourself for now since this can also be used by people using log files. If many people want to use the logging window we could add some option there, but it would be less flexible than the environment variable so let's try getting used to that first.
For rules, the logging verbosity is appended to the category, so in your example above, this specific debug could be disabled with qt.qpa.cocoa.window.debug=false (and keep qt.qpa.cocoa.window.info, qt.qpa.cocoa.window.warning etc active, if any).
Here are a few examples that could also address your other comments:
QT_LOGGING_RULES="qt.*=true;*.debug=true"
This is equivalent to the checkbox or the --logdebug command line switch (and is also shown for reference if you do --help).
QT_LOGGING_RULES="sync.*=true;gui.*=true"
This is everything from the client, including debug, but without qt.*. sync and gui are the only two top-level categories, so you can use them to include anything that is not Qt.
QT_LOGGING_RULES="sync.*=true;gui.*=true;*.debug=false"
The default rules are equivalent to this, it's the same as not setting QT_LOGGING_RULES nor passing --logdebug.
QT_LOGGING_RULES="*.info=false;sync.networkjob.*.info=true"
Disable all info messages already enabled by the default rules and then re-enable all subcategories of sync.networkjob (without sync.networkjob itself because of the dot before the *). This somewhat gives you list of HTTP requests done.
Or any tweak of those that would fit your need better, let me know if it doesn't work.
You can probably also grep logs provided by customers with similar rules, the difference is that the verbosity appears separately before. This could be altered temporarily using something like QT_MESSAGE_PATTERN="%{time MM-dd hh:mm:ss:zzz} [ %{category}.%{type} ]: %{message}" if you want the verbosity at the end of the category like for rules.
Reacted by Samuel Alfageme Sainz and Michael Stingl
Activity
SamuAlfageme commentedon Mar 24, 2017
Some related issues that could be addressed:
butonic commentedon Apr 28, 2017
If the server sent the requestID as a response header, could we add it to the log, so we can link requests between server and client logs? see https://github.com/owncloud/documentation/issues/2967
jturcotte commentedon Apr 28, 2017
@butonic If you tell us which header to put in the log, this should be very easy to do at least for the most important WebDAV methods.
butonic commentedon Apr 30, 2017
Not yet decided. I suppose
X-OC-RequestIdmakes sense? Lets ask the Internet ...It seems Heroku allows clients to send a request id in the
X-Request-IDheader. That of course makes sense because the client can then already log the id even when the server fails to respond. I think this maskes more sense then letting the server generate the uuid. That might be a fallback in case noX-Request-IDheader has been sent:RequestHeader setifempty X-Request-ID %{UNIQUE_ID}ein the .htaccess and in oc core we then only check X-Request-ID (see https://serverfault.com/a/797611).@DeepDiver1975 @PVince81 @jturcotte sounds like a plan?
jturcotte commentedon May 17, 2017
I'm putting ReadyToTest but just any kind of QA feedback would be nice regarding the output to see if anything is missing or could be improved.
SamuAlfageme commentedon Jun 15, 2017
infomessages and avoid some noise - the same I do with the Search function but limiting the info dumped to those categories (i.e. like theCapture debug messagesopt.)Capture debug messagesprints the sameqt.qpa.cocoa.windowmessages in loop every few ms. Could we have them only when some change is made?. e.g.This can be closed otherwise. 🏁
jturcotte commentedon Jun 15, 2017
@SamuAlfageme Thanks for the feedback!
About the debug messages, right now it just outputs everything, including all Qt messages. In this mode you shouldn't expect any kind of conciseness, it's only to see if you missed anything and can be filtered in an editor or to know which logging rules to apply to get what you want.
We could add an option to set the filter rules in the log window, but the feedback I got is that many people use log files instead, or log to the console, so I would suggest that you try setting the
QT_LOGGING_RULESenvironment variable yourself for now since this can also be used by people using log files. If many people want to use the logging window we could add some option there, but it would be less flexible than the environment variable so let's try getting used to that first.For rules, the logging verbosity is appended to the category, so in your example above, this specific debug could be disabled with
qt.qpa.cocoa.window.debug=false(and keepqt.qpa.cocoa.window.info,qt.qpa.cocoa.window.warningetc active, if any).Here are a few examples that could also address your other comments:
QT_LOGGING_RULES="qt.*=true;*.debug=true"This is equivalent to the checkbox or the
--logdebugcommand line switch (and is also shown for reference if you do--help).QT_LOGGING_RULES="sync.*=true;gui.*=true"This is everything from the client, including debug, but without
qt.*.syncandguiare the only two top-level categories, so you can use them to include anything that is not Qt.QT_LOGGING_RULES="sync.*=true;gui.*=true;*.debug=false"The default rules are equivalent to this, it's the same as not setting
QT_LOGGING_RULESnor passing--logdebug.QT_LOGGING_RULES="*.info=false;sync.networkjob.*.info=true"Disable all info messages already enabled by the default rules and then re-enable all subcategories of
sync.networkjob(withoutsync.networkjobitself because of the dot before the*). This somewhat gives you list of HTTP requests done.Or any tweak of those that would fit your need better, let me know if it doesn't work.
You can probably also grep logs provided by customers with similar rules, the difference is that the verbosity appears separately before. This could be altered temporarily using something like
QT_MESSAGE_PATTERN="%{time MM-dd hh:mm:ss:zzz} [ %{category}.%{type} ]: %{message}"if you want the verbosity at the end of the category like for rules.