Browse Source

Remove hardcoded ANSI colors from terminal log output

tags/v1.5.3
Nils 3 years ago
parent
commit
307654872a
2 changed files with 11 additions and 5 deletions
  1. +6
    -0
      CHANGELOG
  2. +5
    -5
      src/debug.cpp

+ 6
- 0
CHANGELOG View File

@@ -4,9 +4,14 @@ Format: Double ## for a version number followed by a space, ISO-Date, Semantic V
Two empty lines before the next entry. Two empty lines before the next entry.
External contributors notice at the end of the line: (LastName, FirstName / nick) External contributors notice at the end of the line: (LastName, FirstName / nick)


## 2022-01-15 1.5.3
Remove hardcoded ANSI colors from terminal log output


## 2021-07-15 1.5.2 ## 2021-07-15 1.5.2
pynsm2 library: Fixed a rare crash, where the hostname must be case sensitive but Pythons urlparse forced lower-case. pynsm2 library: Fixed a rare crash, where the hostname must be case sensitive but Pythons urlparse forced lower-case.



## 2021-03-19 1.5.1 ## 2021-03-19 1.5.1
Web-URLs changed to https://new-session-manager.jackaudio.org and https://github.com/jackaudio/new-session-manager Web-URLs changed to https://new-session-manager.jackaudio.org and https://github.com/jackaudio/new-session-manager
No codechanges. No codechanges.
@@ -46,6 +51,7 @@ Extras:
nsm.h was moved to extras/nsm.h nsm.h was moved to extras/nsm.h
"extras/pynsm" is now a part of NEW-SM. It was a standalone git repo until now. "extras/pynsm" is now a part of NEW-SM. It was a standalone git repo until now.



## 2020-07-15 1.4.0 ## 2020-07-15 1.4.0
Add documentation and manpages. Add documentation and manpages.




+ 5
- 5
src/debug.cpp View File

@@ -38,15 +38,15 @@ warnf ( warning_t level,
{ {
va_list args; va_list args;
static const char *level_tab[] = { static const char *level_tab[] = {
"message", "\033[1;32m",
"warning", "\033[1;33m",
"assertion", "\033[1;31m"
"message", "",
"warning", "",
"assertion", ""
}; };


module = program_invocation_short_name; module = program_invocation_short_name;


if ( module ) if ( module )
fprintf( stderr, "[\033[1;30m%s\033[0m] ", module );
fprintf( stderr, "[%s] ", module );
#ifndef NDEBUG #ifndef NDEBUG
if ( file ) if ( file )
fprintf( stderr, "%s", file ); fprintf( stderr, "%s", file );
@@ -69,5 +69,5 @@ warnf ( warning_t level,
va_end( args ); va_end( args );
} }


fprintf( stderr, "\033[0m\n" );
fprintf( stderr, "\n" );
} }

Loading…
Cancel
Save