Allow a way to disable log redirection through QgsMessageLog#133
Allow a way to disable log redirection through QgsMessageLog#133suricactus merged 1 commit intomasterfrom
QgsMessageLog#133Conversation
|
Task linked: QF-7321 Avoid logging repetition in QGIS jobs logs |
By introducing `IS_WITHIN_QFC_WORKER` we are going to instruct `libqfieldsync` to not redirect logs to the `QgsMessageLog`, therefore avoiding repetitions such as: ``` 14:22:54.842 QGSMSGLOG INFO Layer "list_salutation" will use attribute "fid" as a primary key. 14:22:54.842 libqfieldsync INFO Layer "list_salutation" will use attribute "fid" as a primary key. ```
6eeff16 to
6e8f7f4
Compare
gounux
left a comment
There was a problem hiding this comment.
Thanks ! Indeed : less noise, smarter logs ;)
Assuming that not having this IS_WITHIN_QFC_WORKER envvar set means it's running inside QFS, I'm wondering if it would make sense to add the sister IS_WITHIN_QFIELDSYNC envvar, in case tomorrow there would be another "component" making use of libqfieldsync ?
BTW, LGTM IMHO, maybe just too maniac here, you tell me :)
|
How do you configure Actually I was asking myself whether we should rename the variable to Would be great if there is a green checkmark to ensure it's a LGTM :) |
gounux
left a comment
There was a problem hiding this comment.
How do you configure IS_WITHIN_QFIELDSYNC on a windows machine running QGIS? We do not have control over the envvars on QGIS desktops.
I was looking at this the other day : https://qgis-deployment.github.io/qgis-deployment-toolbelt-cli/
TBH IDK if I'm aware of how far it can get, maybe it's possible to manage some envvars using this toolbelt ?
Would be great if there is a green checkmark to ensure it's a LGTM :)
Sure, here you go :)
By introducing
IS_WITHIN_QFC_WORKERwe are going to instructlibqfieldsyncto not redirect logs to theQgsMessageLog, therefore avoiding repetitions such as:See opengisch/QFieldCloud#1439