Public Member Functions | List of all members
pqUsageLoggingBehavior Class Reference

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...
 

Detailed Description

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.

Configuration File Specification

The configuration file is a simple JSON as follows:

{
"version": 1.0,
"url": "http://....",
"params": {
"user": "$username$",
"platform": "$platform$",
"date": "$date$",
"product": "$appname$",
"version": "$appversion$"
}
}

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:

Standard Locations

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.

Constructor & Destructor Documentation

◆ pqUsageLoggingBehavior()

pqUsageLoggingBehavior::pqUsageLoggingBehavior ( QObject *  parent = nullptr)

◆ ~pqUsageLoggingBehavior()

pqUsageLoggingBehavior::~pqUsageLoggingBehavior ( )
override

Member Function Documentation

◆ setConfigFileName()

static void pqUsageLoggingBehavior::setConfigFileName ( const QString &  fname)
static

Get/set the name of the configuration file.

This must be set before instantiating pqUsageLoggingBehavior. Default is usage_logger.json.

◆ configFileName()

static const QString& pqUsageLoggingBehavior::configFileName ( )
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.


The documentation for this class was generated from the following file: