/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

#ifndef T_LOGGING_H
#define T_LOGGING_H

extern int g_debug;
extern int g_warn;
extern int g_verbose;

/**
 * Parse debugging output, used to print helpful info
 */
void pdebug(const char* fmt, ...);

/**
 * Parser warning
 */
void pwarning(int level, const char* fmt, ...);

/**
 * Print verbose output message
 */
void pverbose(const char* fmt, ...);

/**
 * Failure!
 */
void failure(const char* fmt, ...);

#endif
