logger.h
Go to the documentation of this file.
/*
* Copyright (C) 2016-2023 Grok Image Compression Inc.
*
* This source code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This source code 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
namespace grk
{
struct logger
{
logger();
void* error_data_;
void* warning_data_;
void* info_data_;
grk_msg_callback error_handler;
grk_msg_callback warning_handler;
grk_msg_callback info_handler;
static logger logger_;
};
void GRK_INFO(const char* fmt, ...);
void GRK_WARN(const char* fmt, ...);
void GRK_ERROR(const char* fmt, ...);
} // namespace grk
grk_msg_callback
void(* grk_msg_callback)(const char *msg, void *client_data)
Logging callback.
Definition grok.h:118
grk
Copyright (C) 2016-2023 Grok Image Compression Inc.
Definition ICacheable.h:20
grk::grk_read
void grk_read(const uint8_t *buffer, TYPE *value, uint32_t numBytes)
Definition BufferedStream.h:239
grk::GRK_INFO
void GRK_INFO(const char *fmt,...)
Definition logger.cpp:40
grk::GRK_ERROR
void GRK_ERROR(const char *fmt,...)
Definition logger.cpp:58
grk::GRK_WARN
void GRK_WARN(const char *fmt,...)
Definition logger.cpp:49
grk::logger
Definition logger.h:22
grk::logger::warning_data_
void * warning_data_
Definition logger.h:25
grk::logger::error_data_
void * error_data_
Definition logger.h:24
grk::logger::error_handler
grk_msg_callback error_handler
Definition logger.h:27
grk::logger::info_data_
void * info_data_
Definition logger.h:26
grk::logger::info_handler
grk_msg_callback info_handler
Definition logger.h:29
grk::logger::logger_
static logger logger_
Definition logger.h:31
grk::logger::warning_handler
grk_msg_callback warning_handler
Definition logger.h:28
grk::logger::logger
logger()
Definition logger.cpp:21