projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cd5ae56
)
temporary noisy logging of config activity
author
Art Cancro
<ajc@uncensored.citadel.org>
Tue, 5 May 2015 15:36:00 +0000
(11:36 -0400)
committer
Art Cancro
<ajc@uncensored.citadel.org>
Tue, 5 May 2015 15:36:00 +0000
(11:36 -0400)
citadel/config.c
patch
|
blob
|
history
diff --git
a/citadel/config.c
b/citadel/config.c
index 846eb052f99d5424282c0440913d82e233dc71fd..ed7a06914918d3afbdda4699a508e955e3af2103 100644
(file)
--- a/
citadel/config.c
+++ b/
citadel/config.c
@@
-356,6
+356,9
@@
void CtdlSetConfigStr(char *key, char *value)
int key_len = strlen(key);
int value_len = strlen(value);
int key_len = strlen(key);
int value_len = strlen(value);
+ /* FIXME we are noisy logging for now */
+ syslog(LOG_DEBUG, "\033[31mSET CONFIG: '%s' = '%s'\033[0m", key, value);
+
/* Save it in memory */
Put(ctdlconfig, key, key_len, strdup(value), NULL);
/* Save it in memory */
Put(ctdlconfig, key, key_len, strdup(value), NULL);
@@
-412,6
+415,7
@@
char *CtdlGetConfigStr(char *key)
/* First look in memory */
if (GetHash(ctdlconfig, key, key_len, (void *)&value))
{
/* First look in memory */
if (GetHash(ctdlconfig, key, key_len, (void *)&value))
{
+ syslog(LOG_DEBUG, "\033[32mGET CONFIG: '%s' = '%s'\033[0m", key, value);
return value;
}
return value;
}
@@
-420,6
+424,7
@@
char *CtdlGetConfigStr(char *key)
cdb = cdb_fetch(CDB_CONFIG, key, key_len);
if (cdb == NULL) { /* nope, not there either. */
cdb = cdb_fetch(CDB_CONFIG, key, key_len);
if (cdb == NULL) { /* nope, not there either. */
+ syslog(LOG_DEBUG, "\033[32mGET CONFIG: '%s' = NULL\033[0m", key);
return(NULL);
}
return(NULL);
}
@@
-427,6
+432,7
@@
char *CtdlGetConfigStr(char *key)
value = strdup(cdb->ptr + key_len + 1); /* The key was stored there too; skip past it */
cdb_free(cdb);
Put(ctdlconfig, key, key_len, value, NULL);
value = strdup(cdb->ptr + key_len + 1); /* The key was stored there too; skip past it */
cdb_free(cdb);
Put(ctdlconfig, key, key_len, value, NULL);
+ syslog(LOG_DEBUG, "\033[32mGET CONFIG: '%s' = '%s'\033[0m", key, value);
return value;
}
return value;
}