1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00

Now that most of the usage of 'stack' only occurs when there's an error,

don't suppress it from the screen output any longer.
This commit is contained in:
Alasdair Kergon 2002-02-11 18:25:18 +00:00
parent 33e8b747ac
commit 8d6a8717bb
3 changed files with 5 additions and 3 deletions

View File

@ -48,6 +48,9 @@ int device_info(const char *name, struct dm_info *info)
return r;
}
/*
* The next three functions return -1 on error.
*/
int device_active(const char *name)
{
struct dm_info info;

View File

@ -95,7 +95,7 @@ void print_log(int level, const char *file, int line, const char *format, ...) {
va_start(ap, format);
switch(level) {
case _LOG_DEBUG:
if (_verbose_level > 2 && format[1]) {
if (_verbose_level > 2) {
printf("%s%s", _cmd_name, _msg_prefix);
if (_indent)
printf(" ");

View File

@ -15,7 +15,6 @@
* log_verbose - print to stdout if verbose is set (-v)
* log_very_verbose - print to stdout if verbose is set twice (-vv)
* log_debug - print to stdout if verbose is set three times (-vvv)
* (suppressed if single-character string such as with 'stack')
*
* In addition, messages will be logged to file or syslog if they
* are more serious than the log level specified with the log/debug_level
@ -72,7 +71,7 @@ void print_log(int level, const char *file, int line, const char *format, ...)
#define log_err(x...) plog(_LOG_ERR, x)
#define log_fatal(x...) plog(_LOG_FATAL, x)
#define stack log_debug("<stack>") /* Backtrace on error */
#define stack log_debug("<backtrace>") /* Backtrace on error */
#define log_error(fmt, args...) log_err(fmt , ## args)
#define log_print(fmt, args...) log_warn(fmt , ## args)