Commit Graph

32 Commits

Author SHA1 Message Date
Andrew Bettison
2b57773472 Add log_backtrace() function 2012-07-25 17:02:57 +09:30
Jeremy Lakeman
5ec739c712 Add performance timing debug option 2012-07-25 13:33:30 +09:30
Andrew Bettison
0c260a966e Small improvement in toprint() 2012-07-13 18:00:25 +09:30
Andrew Bettison
41f3228300 Refactor rhizome HTTP request parsing
Replace DEBUG_RHIZOMESYNC with DEBUG_RHIZOME_TX
2012-07-13 11:06:10 +09:30
Andrew Bettison
025ccad810 Replace DEBUG_DNAVARS with DEBUG_RHIZOME_RX
Delete some obsolete HLR code
Mark DEBUG_HLR as deprecated
2012-07-12 16:26:37 +09:30
Andrew Bettison
bdd0bb357f Improve logging config options
Rename config option "logfile" to "log.file"
Add "log.show_pid" boolean
Add "log.show_time" boolean
2012-07-11 17:09:50 +09:30
Andrew Bettison
f50da147d6 Fix log.c: open_logging() sets log_pid and log_time vars 2012-07-11 16:59:08 +09:30
Jeremy Lakeman
51d66f5d9e Fix compilation for android 2012-07-11 16:05:03 +09:30
Andrew Bettison
6556637251 Add HH:MM:SS.mmm timestamp to non-Android log entries 2012-07-11 14:18:36 +09:30
Andrew Bettison
a15a9146c3 Improve toprint() and alloca_toprint() 2012-07-11 14:17:53 +09:30
Andrew Bettison
69ff860b4f Add rhizome sync logging to 'rhizomeprotocol' test 2012-07-10 20:00:20 +09:30
Andrew Bettison
e8eab5b27e Improve diagnostics from write_all(), write_nonblock() etc.
Add toprint() function and alloca_toprint() macro.
2012-07-10 19:57:56 +09:30
Jeremy Lakeman
624be364bf fix android log spam 2012-07-10 14:33:07 +09:30
Andrew Bettison
a80da50636 Finish rewriting configuration and logging code
Fix endless recursion if error or debug logged while reading config file
Fix 'config del' logic
Log messages made before log file can be opened are buffered and written
once the file is open
Do not log to file in ANDROID version, just to Android's log system
2012-07-05 14:59:50 +09:30
Andrew Bettison
ab64b08ceb Rewrite config file code
Gets rid of rotor in confValueGet() and duplicate config file parsing code
Currently fails three tests
2012-07-04 18:57:02 +09:30
Andrew Bettison
a90c0156ed New DEBUG_MDPREQUESTS debug flag
Use it to instrument the MDP_GETADDRS request, to investigate cause of
test 'dnaprotocol' fixture failure
2012-07-04 10:32:38 +09:30
Andrew Bettison
78a8aaca16 Code improvements while debugging 'dnaprotocol' tests
Use ssize_t and size_t where required by system calls
More stringent checking of errors from system calls
Log the offset when writing to dummy interface file
Clean up many WHY/INFO/DEBUG statements
Convert many fprintf(stderr,...) to DEBUGF()
2012-07-03 15:36:51 +09:30
Andrew Bettison
b9836af8a2 Fix debug logging in overlay_interface.c
Also fix bug that closed the logfile when forking the server process.
2012-06-28 17:34:21 +09:30
Andrew Bettison
9625190c6a Improve debug code:
Debug bit mask is unsigned int everywhere.
Refactor DEBUG() macros a bit.
Add SERVALD_DEBUG_FILE env var to support test scripts.
Test defs put instance directories under $TFWVAR not $TFWTMP.
2012-06-28 15:24:43 +09:30
Andrew Bettison
a6ac6a4246 Improve servald logging
Use 'logfile' config entry, fall back to stderr if absent or can't be opened
Replace fprintf(stderr,...) with DEBUGF() in dump() and dumpResponses()
2012-06-22 17:19:14 +09:30
Andrew Bettison
0bf366f789 Respect LOG_LEVEL_SILENT 2012-06-15 18:07:42 +09:30
Andrew Bettison
bea9188cd5 Fix another manifest leak
Add manifest alloc/free debug logging to help, 'debug.manifests' option
2012-05-25 17:01:56 +09:30
Andrew Bettison
0ec3feaa29 Expunge setReason()
Replace with WHY() or WHYF() everywhere

Improve logMessage() to handle file/line/function printing internally

Mainly so that log messages from manifest alloc/free in rhizome_bundle.c
can make it into the Android log
2012-05-24 17:11:55 +09:30
Andrew Bettison
71781b6c12 Cosmetic improvement 2012-05-24 11:28:06 +09:30
Andrew Bettison
2f6f642a02 Improve log pathname trimming 2012-05-23 18:04:10 +09:30
Andrew Bettison
59e58da2f4 More fixes for varargs stuff
But still no luck on Android
2012-05-23 16:07:52 +09:30
gardners
e3a61f7614 improved WHY() macros to not show build path in messages. 2012-05-22 09:54:10 +09:30
Andrew Bettison
b739bfd572 Add catv() function 2012-05-21 00:08:31 +09:30
Andrew Bettison
345b2c1c4c Fix SEGV bug using new strbuf operations 2012-05-20 13:02:41 +09:30
Andrew Bettison
96916c053c Fix some vararg bugs in logMessage() et al 2012-05-19 14:04:30 +09:30
Andrew Bettison
f90b21ec78 Implement rhizome config options
rhizome.datastore_path - if not set, reverts to serval instance path
rhizome.enable - if not set, defaults to true
2012-05-15 12:56:10 +09:30
Andrew Bettison
d11258cefc Overhaul debug flags
Config debug flags are now represented as individual items, eg:
   servald config set debug.verbose yes
   servald config set debug.rhizome yes
instead of aggregated, eg:
   servald config set debug verbose,rhizome  <-- no longer works

Added a debug flag "debug.all" that can be set and cleared, over which
individual flag sets/clears take priority.

Slimmed down dna.c by moving some globals and functions to the files where they
are used.

Default command line (help message) is now the new style, not the deprecated
style.
2012-05-14 18:37:32 +09:30