mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-30 17:49:02 +00:00
spicec: Make loglevel configurable through the environment
Having a loglevel variable is much more useful if we can actually change its value without a recompile. Use a SPICEC_LOG_LEVEL environment variable so we can do this from the spice xpi / activex too (by setting the environment variable before starting the browser).
This commit is contained in:
parent
89accad2bf
commit
ce516b0bdf
@ -45,6 +45,7 @@
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef USE_SMARTCARD
|
||||
@ -2597,6 +2598,12 @@ int Application::main(int argc, char** argv, const char* version_str)
|
||||
{
|
||||
int ret;
|
||||
bool full_screen;
|
||||
char *log_level_str;
|
||||
|
||||
log_level_str = getenv("SPICEC_LOG_LEVEL");
|
||||
if (log_level_str) {
|
||||
log_level = atoi(log_level_str);
|
||||
}
|
||||
|
||||
init_globals();
|
||||
LOG_INFO("starting %s", version_str);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user