diff --git a/main.c b/main.c index 16e54a4..5d6f741 100644 --- a/main.c +++ b/main.c @@ -46,7 +46,7 @@ struct notify_config }; struct config cfg = {"","","",""}; -int loglevel = DEBUG; +int loglevel = INFO; // return date in localized format char * frtime(const time_t timet) @@ -635,14 +635,14 @@ int main() } }else { - sprintf(strlog, "%s: %s Connecté depuis %s - %s %s\n", conn.date, conn.user, ip, conn.cmd, conn.cmdline); + sprintf(strlog, "%s: %s Connecté depuis %s - %s %s", conn.date, conn.user, ip, conn.cmd, conn.cmdline); printlog(strlog, INFO, 0); } }else if (rinfo == -1) { - sprintf(strlog, "%i => 2 pids : en cours de connexion\n", conn.pid); - printlog(strlog, INFO, 0); + sprintf(strlog, "%i => 2 pids : en cours de connexion", conn.pid); + printlog(strlog, DEBUG, 0); } }else { @@ -656,7 +656,7 @@ int main() { time( &now ); sprintf( date, "%s", frtime(now) ); - sprintf(strlog, "Session %d de %s terminée\n", connexions[i].pid, connexions[i].user ); + sprintf(strlog, "Session %d de %s terminée", connexions[i].pid, connexions[i].user ); printlog(strlog, INFO, 0); //sprintf(strlog, "%s: %s - pid %d - Connexion de %s terminée", connexions[i].date, cfg.hostname, connexions[i].pid, connexions[i].user); //printlog(strlog, INFO, 0);