Blame snprintf/core.c

Packit c04fcb
/*
Packit c04fcb
 * core.c
Packit c04fcb
 *
Packit c04fcb
 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Packit c04fcb
 *
Packit c04fcb
 * This library is free software; you can redistribute it and/or
Packit c04fcb
 * modify it under the terms of the GNU Lesser General Public
Packit c04fcb
 * License as published by the Free Software Foundation; only
Packit c04fcb
 * version 2.1 of the License.
Packit c04fcb
 *
Packit c04fcb
 * This library is distributed in the hope that it will be useful,
Packit c04fcb
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit c04fcb
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Packit c04fcb
 * Lesser General Public License for more details.
Packit c04fcb
 *
Packit c04fcb
 * You should have received a copy of the GNU Lesser General Public
Packit c04fcb
 * License along with this library; if not, write to the Free Software
Packit c04fcb
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Packit c04fcb
 */
Packit c04fcb
Packit c04fcb
#include <usterr-signal-safe.h>
Packit c04fcb
Packit c04fcb
volatile enum ust_loglevel ust_loglevel;
Packit c04fcb
Packit c04fcb
void init_usterr(void)
Packit c04fcb
{
Packit c04fcb
	char *ust_debug;
Packit c04fcb
Packit c04fcb
	if (ust_loglevel == UST_LOGLEVEL_UNKNOWN) {
Packit c04fcb
		ust_debug = getenv("LTTNG_UST_DEBUG");
Packit c04fcb
		if (ust_debug)
Packit c04fcb
			ust_loglevel = UST_LOGLEVEL_DEBUG;
Packit c04fcb
		else
Packit c04fcb
			ust_loglevel = UST_LOGLEVEL_NORMAL;
Packit c04fcb
	}
Packit c04fcb
}