[Spice-devel] [PATCH 0.8] spicec: Make loglevel configurable through the environment
Alon Levy
alevy at redhat.com
Wed Jul 20 04:55:11 PDT 2011
On Wed, Jul 20, 2011 at 01:43:42PM +0200, Hans de Goede wrote:
> 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).
ACK.
> ---
> client/application.cpp | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/client/application.cpp b/client/application.cpp
> index f19bd58..9b787c1 100644
> --- a/client/application.cpp
> +++ b/client/application.cpp
> @@ -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);
> --
> 1.7.5.1
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list