##// END OF EJS Templates
server: append to logfiles
Mirko Friedenhagen -
r5690:1b365c57 default
parent child Browse files
Show More
@@ -197,7 +197,7 b' def create_server(ui, repo):'
197 197
198 198 def openlog(opt, default):
199 199 if opt and opt != '-':
200 return open(opt, 'w')
200 return open(opt, 'a')
201 201 return default
202 202
203 203 if repo is None:
@@ -7,7 +7,7 b' mkdir da'
7 7 echo foo > da/foo
8 8 echo foo > foo
9 9 hg ci -Ambase -d '0 0'
10 hg serve -p $HGPORT -d --pid-file=hg.pid
10 hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log
11 11 cat hg.pid >> $DAEMON_PIDS
12 12 echo % manifest
13 13 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=raw')
@@ -28,5 +28,12 b' echo % should give a 400 - bad command'
28 28 echo % should give a 404 - file does not exist
29 29 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork?style=raw'
30 30
31 echo % stop and restart
32 kill `cat hg.pid`
33 hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log
34 cat hg.pid >> $DAEMON_PIDS
35 # Test the access/error files are opened in append mode
36 python -c "print len(file('access.log').readlines()), 'log lines written'"
37
31 38 echo % static file
32 39 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/style-gitweb.css'
@@ -65,6 +65,8 b' 404 Not Found'
65 65
66 66
67 67 error: Path not found: bork/
68 % stop and restart
69 7 log lines written
68 70 % static file
69 71 200 Script output follows
70 72
General Comments 0
You need to be logged in to leave comments. Login now