Nick Mathewson
efe9ca659a
Use recent libevent features when possible
...
svn:r3940
2005-04-01 02:37:40 +00:00
Nick Mathewson
df9c8feac7
Commit fixes for several pending tor core tasks: document all DOCDOCed functions; time out uncontrolled unattached streams; feed reasons to SOCKS5 (refactoring connection_ap_handshake_socks_reply in the process); change DirFetchPeriod/StatusFetchPeriod to have a special "Be smart" value.
...
svn:r3769
2005-03-17 12:38:37 +00:00
Nick Mathewson
70c3580f81
Patch to localtime/gmtime handling: use the _r variants where available. Use mutexes to fake _r where necessary. Make mutexes no-ops where no threading is enabled.
...
svn:r3653
2005-02-22 07:03:03 +00:00
Roger Dingledine
1f3e77bf92
make the initial temp log only notice-err, not info-err
...
svn:r3274
2005-01-04 02:25:18 +00:00
Roger Dingledine
c3189c2573
fix an assert on startup when the disk is full and you're logging to a file
...
svn:r3204
2004-12-22 08:16:42 +00:00
Nick Mathewson
a3477223de
clarify why strlcpy is safe in truncated log messages
...
svn:r3032
2004-11-30 06:15:06 +00:00
Nick Mathewson
7fbd297532
Suggestion from weasel: Make tor --version --version dump the cvs Id of every file.
...
svn:r3019
2004-11-29 22:25:31 +00:00
Nick Mathewson
b6b07d1d98
Remove needless -2 in log code. This was not an underflow risk, sinze we only call format_msg from one place, where buf_len==10024
...
svn:r3017
2004-11-29 20:39:55 +00:00
Roger Dingledine
671a2de762
clean up the previous underflow check, and also point out
...
yet another one that may be a problem. nick?
svn:r3016
2004-11-29 08:40:24 +00:00
Roger Dingledine
185f047450
prevent integer underflow
...
(not currently exploitable, ilja and i think)
svn:r3010
2004-11-29 06:43:21 +00:00
Roger Dingledine
22727b4edc
wrong is ok, and right is fine, but in between is apparently
...
totally unacceptable to me.
svn:r3005
2004-11-28 11:39:53 +00:00
Nick Mathewson
6f5dbefa7e
Normalize space: add one between every control keyword and control clause.
...
svn:r3003
2004-11-28 09:05:49 +00:00
Roger Dingledine
7c9a707900
remove emacs droppings, since nick says he doesn't need them anymore
...
svn:r2989
2004-11-26 04:00:55 +00:00
Peter Palfrader
f2a96ce1fe
Flush the logfd after we print "Tor opening log file", so we don't see those messages days later
...
svn:r2980
2004-11-24 08:42:06 +00:00
Roger Dingledine
d4ac7300d6
and a comment so i don't try to 'fix' it again later
...
svn:r2919
2004-11-20 12:17:19 +00:00
Roger Dingledine
246b14d8e9
yes, in fact, i broke it. putting back.
...
svn:r2918
2004-11-20 12:16:47 +00:00
Roger Dingledine
dd19cf6ba3
kill -USR2 now moves all logs to loglevel debug
...
plus fix some typos
svn:r2914
2004-11-20 07:33:55 +00:00
Roger Dingledine
a30a5bce0f
simplify close_temp_logs()
...
(nick, did i break this?)
svn:r2913
2004-11-20 07:08:00 +00:00
Roger Dingledine
a8840db4ac
remove another possible sigpipe cause
...
svn:r2912
2004-11-20 06:52:13 +00:00
Nick Mathewson
6143c515cd
Make log_fn not fail so miserably on VC6
...
svn:r2896
2004-11-15 23:30:26 +00:00
Nick Mathewson
5b668d8557
ugly macros to make log_fn play nice on non-GCC compilers.
...
svn:r2894
2004-11-15 21:18:07 +00:00
Nick Mathewson
783bbcf471
Fix "implicit declaration of ftello" warning: add AC_FUNC_FSEEKO in configure.in and always include orconfig.h before anything else
...
svn:r2854
2004-11-14 17:21:32 +00:00
Roger Dingledine
14c7ad409f
remove redundant stdio.h
...
i guess that wasn't the fix
svn:r2849
2004-11-14 09:49:27 +00:00
Roger Dingledine
bd4d99b3fe
clean up the ftello call a little bit.
...
but i'm still getting:
log.c:94: warning: implicit declaration of function `ftello'
svn:r2848
2004-11-14 09:48:54 +00:00
Nick Mathewson
5d92fbe30e
Use autoconf to enable largefile support where necessary. Use ftello where available, since ftell can fail at 2GB.
...
svn:r2806
2004-11-12 05:05:41 +00:00
Nick Mathewson
5a5be93f80
Normalize whitespace; add a "tell me about all the unnormalized whitespace" target; fix a braino in dirserv.c
...
svn:r2758
2004-11-09 20:04:00 +00:00
Roger Dingledine
8c7b2ff7ed
various fixes
...
svn:r2712
2004-11-09 01:24:10 +00:00
Nick Mathewson
2e8353e2f4
Use new log format; convert old format to new format.
...
svn:r2684
2004-11-05 05:50:35 +00:00
Nick Mathewson
70f7e32ec6
fix typos
...
svn:r2666
2004-11-03 21:53:12 +00:00
Nick Mathewson
11979dc1f5
Add a callback log handler type
...
svn:r2658
2004-11-03 18:27:19 +00:00
Nick Mathewson
2fbf31533b
Tricksy compiler warnings! We hates them, hates them forever, my precious!
...
svn:r2615
2004-10-27 21:14:11 +00:00
Nick Mathewson
44d4516155
Use tor_snprintf, not snprintf
...
svn:r2609
2004-10-27 06:37:34 +00:00
Nick Mathewson
bc62f8e983
Replace sprintf with snprintf
...
svn:r2602
2004-10-27 05:53:07 +00:00
Nick Mathewson
26f3cb8652
Add SysLog option to direct log messages to the system log instead of a FILE*.
...
svn:r2591
2004-10-26 21:48:41 +00:00
Roger Dingledine
6d873e5743
don't assert multiple things in the same tor_assert()
...
svn:r2545
2004-10-16 22:28:11 +00:00
Roger Dingledine
8385fdb590
make our tor_assert actually work when it's going to be triggered,
...
rather than seg fault
svn:r2368
2004-09-23 05:02:51 +00:00
Roger Dingledine
a1979800ab
bugfix on the bugfix
...
actually unlink the log entry.
ok, that wasn't cleverly hidden enough. let's try again.
svn:r2367
2004-09-23 04:59:02 +00:00
Roger Dingledine
f753f6f0e2
bugfix: when we run out of disk space, or other log writing error,
...
don't crash. just stop logging to that log and continue.
nick, can you find the bug i've cleverly hidden in this commit?
svn:r2365
2004-09-23 03:51:45 +00:00
Roger Dingledine
7304ac1d6f
tweak the [...truncated] string again
...
svn:r2289
2004-08-18 11:21:50 +00:00
Roger Dingledine
40f9f94794
don't add a spurious newline before [truncated]
...
svn:r2282
2004-08-18 08:52:12 +00:00
Nick Mathewson
ebf2d275bf
End truncated log entries with [truncated]
...
svn:r2235
2004-08-15 20:13:07 +00:00
Roger Dingledine
17e5f25214
trivial punctuation tweak
...
svn:r2027
2004-07-12 16:51:28 +00:00
Nick Mathewson
653aaeef08
Always log version when starting tor.
...
svn:r1990
2004-06-30 16:35:11 +00:00
Nick Mathewson
8aec3a7301
Implement several 008pre1 items: needs more testing
...
svn:r1981
2004-06-21 04:37:27 +00:00
Nick Mathewson
605e10a650
Stop multiplying logs on sighup.
...
svn:r1936
2004-06-02 19:18:37 +00:00
Roger Dingledine
f875db1821
it looks like parse_log_level() was never taught about WARN?
...
svn:r1917
2004-05-21 12:38:52 +00:00
Nick Mathewson
ccb825128e
Tinker with log behavior: never send error messages about logs into the bitbucket
...
svn:r1912
2004-05-20 19:47:28 +00:00
Nick Mathewson
9d2cd7fc6e
Allow multiple logfiles at different severity ranges
...
svn:r1899
2004-05-19 20:07:08 +00:00
Roger Dingledine
3cdf2d67da
it's amazing what a bit of punctuation can do for appearances
...
svn:r1843
2004-05-10 10:27:54 +00:00
Nick Mathewson
c0ea93337d
Doxygenate common.
...
svn:r1829
2004-05-10 03:53:24 +00:00
Nick Mathewson
7055f837ab
Make Tor build on win32 with VC6 without warnings.
...
svn:r1739
2004-04-28 20:13:21 +00:00
Nick Mathewson
257d509b91
Document stuff, reduce magic numbers, add emacs magic
...
svn:r1502
2004-04-06 03:44:36 +00:00
Nick Mathewson
b3c2b62a14
Make "common" no longer depend on or.h
...
svn:r1466
2004-04-03 04:05:12 +00:00
Nick Mathewson
137b577bbd
Refactor the heck out of crypto interface: admit that we will stick with one ciphersuite at a time, make const things const, and stop putting openssl in the headers.
...
svn:r1458
2004-04-03 02:40:30 +00:00
Roger Dingledine
0864d3f484
add in a 'notice' log level
...
svn:r1383
2004-03-30 03:15:23 +00:00
Roger Dingledine
3ccd545c9a
crash when our logs go bad
...
nick, can you think of a better response here?
svn:r1268
2004-03-14 15:50:00 +00:00
Nick Mathewson
2da54de968
Make tor build on windows again. More work still needed
...
svn:r1247
2004-03-09 22:01:17 +00:00
Roger Dingledine
eb730c41c8
clean tabs, trailing whitespace
...
svn:r952
2003-12-17 21:14:13 +00:00
Roger Dingledine
a5aa80cc41
make --debuglogfile (or any second log file) work
...
svn:r935
2003-12-14 09:58:43 +00:00
Peter Palfrader
9a676b04dd
Check that we can write to the logfile and log a warning to stderr if we can't
...
Move writing of pidfile after daemonizing, and also after setting the [ug]id:
This means that the tor user needs write priviliges to the pidfile location.
It needs it for unlinking the pidfile anyway.
svn:r846
2003-11-19 02:09:43 +00:00
Roger Dingledine
82aa621b47
rewrite close_logs so it could possibly work
...
remove deadbeef memory-clobber testing (for now)
svn:r616
2003-10-18 00:07:58 +00:00
Roger Dingledine
11a23fc280
clean up logging, allow user to specify log files
...
If DebugLogFile is specified, log to it at -l debug
If LogFile is specified, log to it at the -l from the commandline
(default info)
If no LogFile *and* not a Daemon, then log to stdout.
Make conn->s = -1 by default (this might break things)
When kill -USR1, prefer to log at INFO, but make sure they always see it.
svn:r596
2003-10-15 18:50:16 +00:00
Nick Mathewson
22ef733058
Make add_file_log return 0 on success.
...
svn:r594
2003-10-15 18:38:38 +00:00
Roger Dingledine
8df0eee16a
oops, bugfix
...
svn:r572
2003-10-10 01:50:20 +00:00
Roger Dingledine
36fb8e839d
change WARNING to WARN
...
svn:r570
2003-10-10 01:48:03 +00:00
Nick Mathewson
36939303c9
Update LICENSE and copyright dates.
...
svn:r560
2003-10-08 02:04:08 +00:00
Roger Dingledine
de6cbe53c0
some early bugfixes
...
our log() conflicts with log(3)
distribute only the correct files from doc/ and src/config/
sometimes laptops go back in time. i guess that's ok for now.
and bump the version number because we're live.
svn:r544
2003-10-07 16:30:05 +00:00
Roger Dingledine
be874358a4
wrap strdup; prefer time() to gettimeofday()
...
svn:r538
2003-10-04 03:29:09 +00:00
Roger Dingledine
750b238aea
clean some includes
...
svn:r535
2003-10-04 01:36:11 +00:00
Nick Mathewson
f694ab23f5
Flush after fputs
...
svn:r526
2003-10-01 00:42:24 +00:00
Roger Dingledine
f0e94dab86
make log use a larger buffer, for easier debugging
...
svn:r515
2003-09-30 19:53:25 +00:00
Roger Dingledine
3ed7aedc11
bugfixes and features: closer to making dirserv work
...
fix a variety of seg faults
don't try to list OPs in running-routers
write cached-directory to disk when rebuilding the dir
on boot, dirservers load approved-routers file
on boot, dirservers load cached directory file
svn:r508
2003-09-29 23:14:49 +00:00
Roger Dingledine
bf10a3c0f1
finish enforcing the log convention
...
svn:r494
2003-09-26 22:27:24 +00:00
Roger Dingledine
3b5191d36d
various bugfixes and updates
...
redo all the config files for the new format (we'll redo them again soon)
fix (another! yuck) segfault in log_fn when input is too large
tor_tls_context_new() returns -1 for error, not NULL
fix segfault in check_conn_marked() on conn's that die during tls handshake
make ORs also initialize conn from router when we're the receiving node
make non-dirserver ORs upload descriptor to every dirserver on startup
add our local address to the descriptor
add Content-Length field to POST command
revert the Content-Length search in fetch_from_buf_http() to previous code
fix segfault in memmove in fetch_from_buf_http()
raise maximum allowed headers/body size in directory.c
svn:r484
2003-09-25 10:42:07 +00:00
Roger Dingledine
e514ac528c
fix a segfault on truncated log lines
...
svn:r473
2003-09-19 09:30:34 +00:00
Nick Mathewson
7711c2e745
Add backend support for multiple logfiles, including console logs.
...
Also optimize logging by formatting messages in memory before sending
them through stdio. (It turns out (according to gprof) that logging
performance matters.)
svn:r463
2003-09-16 17:58:36 +00:00
Nick Mathewson
5082ee8ae0
Non-debugging messages are nice to log too
...
svn:r444
2003-09-11 22:13:13 +00:00
Nick Mathewson
c336c99e60
Start of port to win32. Missing are:
...
- signal support
- forking for DNS farm
- changes for async IO
- daemonizing
In other words, some files still don't build, and the ones that do build,
do nonblocking IO incorrectly.
I'm also not checking in the project files till I have a good place
for them.
svn:r380
2003-08-12 03:08:41 +00:00
Roger Dingledine
6c9e3762b5
clean up sev_to_string hack in log.c
...
svn:r355
2003-06-25 04:47:54 +00:00
Nick Mathewson
efbcd71b9b
Remove false warnings from printf checks
...
svn:r340
2003-06-21 19:03:22 +00:00
Nick Mathewson
5fd033a8e8
Come up with a less macro-happy, even more portable log_fn implementation
...
svn:r331
2003-06-17 21:36:44 +00:00
Nick Mathewson
2b2eff33c5
Add a missing long cast to log.c for portability
...
svn:r199
2003-03-19 20:54:39 +00:00
Roger Dingledine
f50f35f2ec
added milliseconds to log lines
...
svn:r139
2002-11-24 08:45:13 +00:00
Roger Dingledine
4eb0158f42
the logs now include a timestamp and severity
...
the implementation is sort of a kludge..you're welcome to fix it up
svn:r94
2002-09-04 00:39:33 +00:00
Bruce Montrose
be25ffd5d7
removed loglevel from global namespace. severity level is set using log() with a NULL format argument now. example: log(LOG_ERR,NULL);
...
svn:r44
2002-07-12 18:14:17 +00:00
Roger Dingledine
9a928eeb12
Initial revision
...
svn:r2
2002-06-26 22:45:49 +00:00