Plugin Configuration

Navigation:  LVE-Stats 2 > Creating a Plugin for LVE Stats 2 >

Plugin Configuration

Previous pageReturn to chapter overviewNext page

LVE Stats 2 Server allows to configure each plugin separately.


On initialization stage the server invokes set_config() method of the plugin and locates there a dictionary which contains:


all parameters from file /etc/sysconfig/lvestats2 (global).

plugin's individual configuration file parameters (if one exists). Configuration files must be located in /etc/sysconfig/lvestats.config directory, have .cfg extension and be the same format as /etc/sysconfig/lvestats2. Files in this directory are matched with the plugins by name. For instance, if plugin's class is Plugin1_class, then server will try to find and download /etc/sysconfig/lvestats.config/Plugin1_class.cfg. Names are case sensitive. If any plugin doesn't have an individual configuration file, then it's not an error. In this case plugin will just receive parameters from /etc/sysconfig/lvestats2.


Note. An individual configuration file of every plugin is loaded after server configuration file. That is why if it contains any parameters with names similar to ones of server config, then plugin will use parameters from its individual config rather than server config parameters.


If a plugin doesn't require any configuration to be done, then set_config method can be skipped.


In addition, plugins can use their own configuration methods.