Skip to content

Commit

Permalink
Reduce amount of logging (#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryblakley authored Jan 30, 2018
1 parent a4d0fba commit 65a136c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/filecache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ static int clear_files(const char *filecache_path, time_t stamped_time, GError *
fname, cachefile_path, errno, strerror(errno));
--ret;
}
log_print(LOG_NOTICE, SECTION_FILECACHE_CLEAN, "%s: unlinked %s", fname, cachefile_path);
log_print(LOG_INFO, SECTION_FILECACHE_CLEAN, "%s: unlinked %s", fname, cachefile_path);
++unlinked;
}
else {
Expand All @@ -1532,7 +1532,7 @@ static int clear_files(const char *filecache_path, time_t stamped_time, GError *
}
}
closedir(dir);
log_print(LOG_NOTICE, SECTION_FILECACHE_CLEAN, "%s: visited %d files, unlinked %d, and had %d issues",
log_print(LOG_INFO, SECTION_FILECACHE_CLEAN, "%s: visited %d files, unlinked %d, and had %d issues",
fname, visited, unlinked, ret);

// return the number of files still left
Expand Down Expand Up @@ -1795,6 +1795,6 @@ void filecache_cleanup(filecache_t *cache, const char *cache_path, bool first, G
}

finish:
log_print(LOG_NOTICE, SECTION_FILECACHE_CLEAN, "filecache_cleanup: visited %d cache entries; unlinked %d, pruned %d, had %d issues",
log_print(LOG_INFO, SECTION_FILECACHE_CLEAN, "filecache_cleanup: visited %d cache entries; unlinked %d, pruned %d, had %d issues",
cached_files, unlinked_files, pruned_files, issues);
}
2 changes: 1 addition & 1 deletion src/fusedav-statsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static int stats_send(const char *statmsg) {
if (bytes == -1) {
// Since the is UDP, sendto can't know if the message was never delivered. Error means local error that
// it can detect.
log_print(LOG_NOTICE, SECTION_STATS_DEFAULT, "stats_send: Error, errno: %d, %s. Couldn't send stat \"%s\"",
log_print(LOG_INFO, SECTION_STATS_DEFAULT, "stats_send: Error, errno: %d, %s. Couldn't send stat \"%s\"",
errno, strerror(errno), statmsg);
} else if (bytes < statmsglen) {
log_print(LOG_CRIT, SECTION_STATS_DEFAULT, "stats_send: sendto error: expected %d bytes; got %d", statmsglen, bytes);
Expand Down
10 changes: 5 additions & 5 deletions src/fusedav.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ static void getdir_propfind_callback(__unused void *userdata, const char *path,
*/
else if (existing && existing->updated > st.st_ctime) {
if (status_code == 410) {
log_print(LOG_NOTICE, SECTION_FUSEDAV_PROP,
log_print(LOG_INFO, SECTION_FUSEDAV_PROP,
"%s: Ignoring outdated removal of path: %s (%lu %lu)",
funcname, path, existing->updated, st.st_ctime);
}
Expand Down Expand Up @@ -402,10 +402,10 @@ static void getdir_propfind_callback(__unused void *userdata, const char *path,
if (status_code == 410) {
// Inserting negative entry
if (st.st_mode != 0) {
log_print(LOG_WARNING, SECTION_FUSEDAV_PROP,
log_print(LOG_INFO, SECTION_FUSEDAV_PROP,
"%s: Expected negative entry (5); got: %s : st_mode=%d", funcname, path, st.st_mode);
}
log_print(LOG_NOTICE, SECTION_FUSEDAV_PROP, "%s: normal case, deleting: %s",
log_print(LOG_INFO, SECTION_FUSEDAV_PROP, "%s: normal case, deleting: %s",
funcname, path);
stat_cache_negative_set(&value);
stat_cache_value_set(config->cache, path, &value, &subgerr1);
Expand Down Expand Up @@ -2374,7 +2374,7 @@ int main(int argc, char *argv[]) {

ret = 0;

log_print(LOG_NOTICE, SECTION_FUSEDAV_MAIN, "Left main FUSE loop. Shutting down.");
log_print(LOG_INFO, SECTION_FUSEDAV_MAIN, "Left main FUSE loop. Shutting down.");

finish:
if (gerr) {
Expand All @@ -2392,7 +2392,7 @@ int main(int argc, char *argv[]) {
free(mountpoint);
}

log_print(LOG_NOTICE, SECTION_FUSEDAV_MAIN, "Unmounted.");
log_print(LOG_INFO, SECTION_FUSEDAV_MAIN, "Unmounted.");

if (fuse) {
fuse_destroy(fuse);
Expand Down
6 changes: 3 additions & 3 deletions src/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ static bool set_health_status(char *addr, char *curladdr) {
"%s: new entry doesn't have curladdr %s", funcname, addr);
}
g_hash_table_replace(node_status.node_hash_table, g_strdup(addr), healthstatus);
log_print(LOG_NOTICE, SECTION_SESSION_DEFAULT,
log_print(LOG_INFO, SECTION_SESSION_DEFAULT,
"%s: creating new entry for %s // %s", funcname, addr, curladdr);
added_entry = true;
}
Expand Down Expand Up @@ -736,7 +736,7 @@ static void construct_resolve_slist(GHashTable *addr_table) {
if (!exists) {
// Add to node_hash_table
set_health_status(key, value);
log_print(LOG_NOTICE, SECTION_SESSION_DEFAULT, "%s: added to hash table %s :: %s",
log_print(LOG_INFO, SECTION_SESSION_DEFAULT, "%s: added to hash table %s :: %s",
funcname, key, value);
}
}
Expand Down Expand Up @@ -1135,7 +1135,7 @@ static bool needs_new_session(bool tmp_session) {
log_print(LOG_DEBUG, SECTION_SESSION_DEFAULT, "%s?: session (%p)", funcname, session);

if (!session) {
log_print(LOG_NOTICE, SECTION_SESSION_DEFAULT, "%s: !session", funcname);
log_print(LOG_INFO, SECTION_SESSION_DEFAULT, "%s: !session", funcname);
new_session = true;
}

Expand Down

0 comments on commit 65a136c

Please sign in to comment.