Windows Service
The Windows service (Q-ENGINE_service.exe) can be registered or removed as a service via the command line.
To do this, enter the application name followed by the parameter in the Windows command prompt.
It is best to open the command prompt with administrator rights, otherwise the command cannot register or remove the service:
- Service installation
- Q-ENGINE_service /i
- Q-ENGINE_service /install
- Service removal
- Q-ENGINE_service /u
- Q-ENGINE_service /uninstall
If the program is started without a parameter, the application runs in the command prompt.
For example, all logging is then also output in the command prompt.
If the command prompt is closed or the Windows user logs off, this service is also terminated.
For the service to run independently of a Windows user login or command prompt,
the service must be installed as described above.
The service can then be started / stopped via the Windows service settings or via the command line:
net stop "<service>" for example: net stop Q-ENGINE_test or net stop "Q-ENGINE prod"
net start "<service>" for example: net start Q-ENGINE_test or net start "Q-ENGINE prod"
The quotation marks (") are only necessary if the service name contains spaces.
Configuration
The Windows service is configured via settings in the file Q-ENGINE_service.exe.config.
Settings can be made starting at line 22. These are:
| ServiceName | The service name suffix with which the service runs on the system. For example: _test or _prod |
| WaitInSeconds | The time in seconds between service runs (wait time). The minimum is 5 and the maximum is 50. Values outside this range will cause the service not to run. |
| LicenseKeyPath | By default, the service checks its execution directory for a valid license. If a directory path for the license is set, the service also checks whether a valid license is available at this location. For example: C:\Q-Matrix™\ Without a valid license, the service cannot run. |
| QPORTAL_URL | A URL / web address at which Q-PORTAL (if present / available) can be reached, for example: http://localhost/qportal/ |
| DBBackupPath | A directory path for temporarily storing database backups, for example: C:\tmp\ |
For the configured logging variants, the level of detail is set in the RULES element:
<rules>
<!-- Debug: minLevel = Trace - Prod: minLevel = Info -->
<logger name="*" minlevel="Trace" writeTo="debugger" />
<logger name="*" minlevel="Trace" writeTo="console" />
<logger name="*" minlevel="Trace" writeTo="file" />
</rules>
The following logging levels of detail can be set:
| OFF | Logs no application events |
| FATAL | Logs only application events defined as FATAL |
| ERROR | Logs only application events defined as ERROR and FATAL |
| WARN | Logs only application events defined as WARN, ERROR, and FATAL |
| INFO | Logs only application events defined as INFO, WARN, ERROR, and FATAL |
| DEBUG | Logs only application events defined as DEBUG, INFO, WARN, ERROR, and FATAL |
| TRACE | Logs all defined application events |
The logging level is defined starting at line 42, and the default setting for productively used services is set to the INFO level of detail.