Do not log to history with -h/-t/-m

This commit is contained in:
Philippe Teuwen 2019-09-09 21:01:43 +02:00
commit ba47ac36cb
4 changed files with 8 additions and 2 deletions

View file

@ -223,7 +223,7 @@ static void fPrintAndLog(FILE *stream, const char *fmt, ...) {
// lock this section to avoid interlacing prints from different threads
pthread_mutex_lock(&print_lock);
if (logging && !logfile) {
if (!g_disableLogging && logging && !logfile) {
char *my_logfile_path = NULL;
char filename[40];
struct tm *timenow;
@ -284,7 +284,7 @@ static void fPrintAndLog(FILE *stream, const char *fmt, ...) {
}
#endif
if (logging && logfile) {
if (!g_disableLogging && logging && logfile) {
if (filter_ansi) { // already done
fprintf(logfile, "%s\n", buffer2);
} else {