kopia lustrzana https://github.com/stlink-org/stlink
* remove exit() from lib. fix #634 * remove the UFATAL loglevel completely.pull/697/head
rodzic
2ee6edc9ae
commit
7ec1fb78ba
|
@ -10,11 +10,10 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
enum ugly_loglevel {
|
||||
UDEBUG = 90,
|
||||
UINFO = 50,
|
||||
UWARN = 30,
|
||||
UERROR = 20,
|
||||
UFATAL = 10
|
||||
UDEBUG = 90,
|
||||
UINFO = 50,
|
||||
UWARN = 30,
|
||||
UERROR = 20
|
||||
};
|
||||
|
||||
int ugly_init(int maximum_threshold);
|
||||
|
@ -33,8 +32,6 @@ int ugly_log(int level, const char *tag, const char *format, ...);
|
|||
#define WLOG(...) WLOG_HELPER(__VA_ARGS__, "")
|
||||
#define ELOG_HELPER(format, ...) ugly_log(UERROR, UGLY_LOG_FILE, format, __VA_ARGS__)
|
||||
#define ELOG(...) ELOG_HELPER(__VA_ARGS__, "")
|
||||
#define fatal_helper(format, ...) ugly_log(UFATAL, UGLY_LOG_FILE, format, __VA_ARGS__)
|
||||
#define fatal(...) fatal_helper(__VA_ARGS__, "")
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -41,12 +41,6 @@ int ugly_log(int level, const char *tag, const char *format, ...) {
|
|||
case UERROR:
|
||||
fprintf(stderr, "ERROR %s: ", tag);
|
||||
break;
|
||||
case UFATAL:
|
||||
fprintf(stderr, "FATAL %s: ", tag);
|
||||
vfprintf(stderr, format, args);
|
||||
exit(EXIT_FAILURE);
|
||||
// NEVER GETS HERE!!!
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "%d %s: ", level, tag);
|
||||
break;
|
||||
|
|
Ładowanie…
Reference in New Issue