diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-11-25 17:12:53 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-11-25 17:12:53 +0200 |
commit | 8d3b10983b3bd886ce6cb379bdeee9358bd52e03 (patch) | |
tree | 58fd47f8af4577352afeae0024e89c4586396067 | |
parent | 2f28dcb6a445a90d151ab647363a8965aa1f5822 (diff) | |
download | arching-kaos-tools-8d3b10983b3bd886ce6cb379bdeee9358bd52e03.tar.gz arching-kaos-tools-8d3b10983b3bd886ce6cb379bdeee9358bd52e03.tar.bz2 arching-kaos-tools-8d3b10983b3bd886ce6cb379bdeee9358bd52e03.zip |
Clean up and a minor bug fix
-rw-r--r-- | src/aklog.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/src/aklog.c b/src/aklog.c index 04e28b8..248b647 100644 --- a/src/aklog.c +++ b/src/aklog.c @@ -128,42 +128,12 @@ void ak_log_print_log_line(char* line) } break; } - // line[k] - // if ( k - } last_space = i; } - //printf("%c", line[i]); } - // else - // { - // for ( int k = last_space+1; k < i+1; k++ ) - // { - // if ( line[k] == '\0' ) - // { - // printf("just broke: %d\n", k); - // break; - // } - // printf("No break: %d\n", k); - // printf("%c", line[k]); - // } - // } i++; - /* if [ -n "$1" ] - * then - * char* timestamp="$(echo "$*" | awk '{print $1}')"; - * program="$(echo "$*" | awk '{print $2}')"; - * messagetype="$(echo "$*" | awk '{print $3}')"; - * message="$(echo "$*" | cut -d ' ' -f4-)"; - * printf('%s \033[1;32m%s\033[0;00m \033[1;31m%s\033[0;00m %s\n' \ - * "$(date --date=@$timestamp +%Y%m%d_%H%M%S)" \ - * "$program" \ - * "$messagetype" \ - * "$message"); - */ } - printf("\n"); } } @@ -239,7 +209,7 @@ void ak_log_message(char* program, char* type, char* message) printf( "%ld <%s> [%s] %s\n", ts, program, type, message); // out to file though if ( AK_DEBUG ) { - asprintf(&some_string, "%s <%s> [%s] %s\n", ts_string, program, type, message); + asprintf(&some_string, "%s <%s> [%s] %s", ts_string, program, type, message); ak_log_print_log_line(some_string); // fprintf(stderr, "%s <%s> [%s] %s\n", ts_string, program, type, message); } |