mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-22 19:49:36 +00:00
75 lines
2.4 KiB
C
75 lines
2.4 KiB
C
/* XMRig
|
|
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
|
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
|
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
|
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
|
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
|
* Copyright 2016-2017 XMRig <support@xmrig.com>
|
|
*
|
|
*
|
|
* This program 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.
|
|
*
|
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef __APPLOG_H__
|
|
#define __APPLOG_H__
|
|
|
|
enum {
|
|
LOG_ERR,
|
|
LOG_WARNING,
|
|
LOG_NOTICE,
|
|
LOG_INFO,
|
|
LOG_DEBUG,
|
|
LOG_BLUE = 0x10,
|
|
LOG_GREEN
|
|
};
|
|
|
|
#define CL_N "\x1B[0m"
|
|
#define CL_RED "\x1B[31m"
|
|
#define CL_GRN "\x1B[32m"
|
|
#define CL_YLW "\x1B[33m"
|
|
#define CL_BLU "\x1B[34m"
|
|
#define CL_MAG "\x1B[35m"
|
|
#define CL_CYN "\x1B[36m"
|
|
|
|
#define CL_BLK "\x1B[22;30m" /* black */
|
|
#define CL_RD2 "\x1B[22;31m" /* red */
|
|
#define CL_GR2 "\x1B[22;32m" /* green */
|
|
#define CL_BRW "\x1B[22;33m" /* brown */
|
|
#define CL_BL2 "\x1B[22;34m" /* blue */
|
|
#define CL_MA2 "\x1B[22;35m" /* magenta */
|
|
#define CL_CY2 "\x1B[22;36m" /* cyan */
|
|
#define CL_SIL "\x1B[22;37m" /* gray */
|
|
|
|
#ifdef WIN32
|
|
#define CL_GRY "\x1B[01;30m" /* dark gray */
|
|
#else
|
|
#define CL_GRY "\x1B[90m" /* dark gray selectable in putty */
|
|
#endif
|
|
#define CL_LRD "\x1B[01;31m" /* light red */
|
|
#define CL_LGR "\x1B[01;32m" /* light green */
|
|
#define CL_LYL "\x1B[01;33m" /* light yellow */
|
|
#define CL_LBL "\x1B[01;34m" /* light blue */
|
|
#define CL_LMA "\x1B[01;35m" /* light magenta */
|
|
#define CL_LCY "\x1B[01;36m" /* light cyan */
|
|
|
|
#define CL_WHT "\x1B[01;37m" /* white */
|
|
|
|
#define OPT_COLOR(color, text) (opt_colors ? (color text CL_N) : text)
|
|
|
|
|
|
void applog_init();
|
|
void applog(int prio, const char *fmt, ...);
|
|
void applog_notime(int prio, const char *fmt, ...);
|
|
|
|
#endif /* __APPLOG_H__ */
|