behavior to log usage on application startup. More...
#include <pqUsageLoggingBehavior.h>
Inherits QObject.
Public Member Functions | |
pqUsageLoggingBehavior (QObject *parent=nullptr) | |
~pqUsageLoggingBehavior () override | |
Static Public Member Functions | |
static void | setConfigFileName (const QString &fname) |
Get/set the name of the configuration file. More... | |
static const QString & | configFileName () |
Get/set the name of the configuration file. More... | |
behavior to log usage on application startup.
pqUsageLoggingBehavior is used to log usage of the application. On instantiation, this looks for a file named usage_logger.json
at standard locations. If found, the file can be used to specify options that result in making an HTTP POST request to a web-service with parameters providing information about the application usage.
The configuration file is a simple JSON as follows:
version
, and url
are required. Optional params
may be used to specify a collection of key-value parameters to post when making a request to the web-service. $...$
values are replaced at runtime for supported keywords as follows:
$username$
: username$platform$
: OS information (see QSysInfo::prettyProductName()
)$date$
: current date as 'MM/dd/yy'$appname$
: application name (see QApplication::applicationName()
)$appversion$
: appversion version (same as PARAVIEW_VERSION_FULL
)On Windows, the config file may be placed in the same directory as the executable and ParaView dlls.
On MacOS, the config file may be placed in the same directory as the ParaView .dylib
files or in the Resources
directory in the app bundle.
On Linux, the config file may be placed in the same directory as the ParaView .so
files or the executable.
Definition at line 63 of file pqUsageLoggingBehavior.h.
pqUsageLoggingBehavior::pqUsageLoggingBehavior | ( | QObject * | parent = nullptr | ) |
|
override |
|
static |
Get/set the name of the configuration file.
This must be set before instantiating pqUsageLoggingBehavior. Default is usage_logger.json
.
|
inlinestatic |
Get/set the name of the configuration file.
This must be set before instantiating pqUsageLoggingBehavior. Default is usage_logger.json
.
Definition at line 78 of file pqUsageLoggingBehavior.h.