mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
logging: convert rate limited messages to debug messages
This commit is contained in:
18
logging.c
18
logging.c
@@ -49,8 +49,6 @@ static int parent_fd = 0;
|
||||
#define DEBUG_LEVEL_PRINT_DEBUG 2
|
||||
static int debug_level = 0;
|
||||
|
||||
static time_t last_limited = 0;
|
||||
|
||||
#ifdef WINNT
|
||||
static FILE *logfile;
|
||||
#endif
|
||||
@@ -242,22 +240,6 @@ LOG_CloseParentFd()
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
int
|
||||
LOG_RateLimited(void)
|
||||
{
|
||||
time_t now;
|
||||
|
||||
now = time(NULL);
|
||||
|
||||
if (last_limited + 10 > now && last_limited <= now)
|
||||
return 1;
|
||||
|
||||
last_limited = now;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
LOG_FileID
|
||||
LOG_FileOpen(const char *name, const char *banner)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user