Activation of usage data is only available from within the options dialog, but there needs to be a means of also session activating it through a commandline switch and/or environment variable in order to deal with various scenarios.
Possible switch: $ ./soffice --usage-stats
Possible env variable: $ export SAL_USAGE_STATS=1
Env. variable would be preferred. The code where to add it is here:
and add the getenv checking at the beginning of collectUsageInformation() function.
Sounds great to me, just as easy for me to set.
I added "--usage-dump" in aCmdLineHelp_left array. http://opengrok.libreoffice.org/xref/core/desktop/source/app/cmdlinehelp.cxx#53
When run with this parameter LO, bCollecting must be true, as I understand it.
I have to do this, I think:
if(use --usage-dump) // Can you give an example of this control?
bCollecting = true
Am I trying to do the right function?
aybuke: Thank you for working on this!
Please use an environment variable (using getenv()), a command line parameter is an overkill here.
Ie. a code like
static bool bCollecting = getenv("LO_COLLECT_USAGE") != nullptr;
and then initiate the functionality based on that.
Thank you! - glad you are working on this :-)
aybuke committed a patch related to this issue.
It has been pushed to "master":
tdf#96434 Activate usage data collection from commandline.
It will be available in 5.2.0.
The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC)
Is this fixed then?
I tested it and got the usage stats crash, so it must be functioning.