| /* |
| * Copyright © 2011 Linaro Limited |
| * |
| * This file is part of glcompbench. |
| * |
| * glcompbench is free software: you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License as published by |
| * the Free Software Foundation, either version 3 of the License, or |
| * (at your option) any later version. |
| * |
| * glcompbench is distributed in the hope that it will be useful, |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| * GNU General Public License for more details. |
| * |
| * You should have received a copy of the GNU General Public License |
| * along with glcompbench. If not, see <http://www.gnu.org/licenses/>. |
| * |
| * Authors: |
| * Alexandros Frantzis <alexandros.frantzis@linaro.org> |
| * Jesse Barker <jesse.barker@linaro.org> |
| */ |
| |
| #include <cstdio> |
| #include <cstdarg> |
| |
| #include "options.h" |
| #include "log.h" |
| |
| void |
| Log::info(const char *fmt, ...) |
| { |
| va_list ap; |
| va_start(ap, fmt); |
| vfprintf(stdout, fmt, ap); |
| va_end(ap); |
| } |
| |
| void |
| Log::debug(const char *fmt, ...) |
| { |
| if (!Options::show_debug) |
| return; |
| va_list ap; |
| va_start(ap, fmt); |
| vfprintf(stdout, fmt, ap); |
| va_end(ap); |
| } |
| |
| void |
| Log::error(const char *fmt, ...) |
| { |
| va_list ap; |
| va_start(ap, fmt); |
| vfprintf(stderr, fmt, ap); |
| va_end(ap); |
| } |
| |