Examples of using QuidLM in your application
We show how to use QuidLM in different frameworks and programming languages
2025-11-29
QuidLM staff
Table of content
We provide examples in many programming languages, and those are linked from this page. Here we will also discuss the settings that can be selected via environment variables.
Logging
The logging messages of the licensing library are going to the standard error stream by default. The library classifies the events that it generates as belonging to one of these levels:
- trace,
- debug,
- info,
- warn,
- err,
- critical,
- off
and the default logging level is critical, so only messages about fatal events will be output.
You can change the logging level, the logging format, and the logging destination via a documented
language-specific API - for example,
qlm_set_log_level function in the C language API sets the log level. If your application does not
set the logging level via the QuidLM API, you and
your users can change the logging level by setting the QLM_LOG_LEVEL environment variable.
# You can set any of the above 7 levels.
# Below, the `info` and higher level events will be logged.
# UNIX
export QLM_LOG_LEVEL=info
# Windows
SET QLM_LOG_LEVEL=info
License sources
QuidLM empowers your applications to use floating or node-locked licenses. The floating licenses are dispensed by the license server, and your application connects to the license server to grab the necessary license(s) for the duration of the application's run. The node-locked licenses are stored on that computer on which the application runs and are tied to that computer. The QLM_LICENSE_PATH environment variable can instruct the application where to look for both types of licenses.
It is easiest to start with an example and then to spell out the rules. This is how the variable may be set up on Windows
SET QLM_LICENSE_PATH=c:\LicenseStorage;d:\LicenseStorage;9501@example.com;9501@backup-site.com
The content of that variable is a list of sources. Due to the operating system conventions, the sources are separated by the ;
character (colon) on Windows and by the : (semi-colon) on other operating systems. Each source specifies either the network
location of the license server or the directory (folder) where the license files are stored. In the above example, c:\LicenseStorage
is the directory that the application will examine first when searching for the license. The directory is supposed to contain
files with the .lic extension. Such files contain one or more node-locked (tied to the computer) licenses.
If none of the licenses in that directory are suitable for the application, it will proceed to the next
directory on the list - in this case, d:\LicenseStorage. If the application looks through all directories
and does not find the license it needs, it will proceed to the other items on the list. In this case,
we have 9501@example.com, which specifies the network location of the license server.
The format is port-number@host-name-or-ip-address. The application will ask the server to borrow (check out) the
license that it needs. If the license is not available, the application proceeds to the next item on the list, until either
the required license is found or the list is exhausted.