Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
Icecast-Server
Commits
477d44dd
Commit
477d44dd
authored
Sep 12, 2005
by
Karl Heyes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log username to access log (bug #706) if available.
svn path=/icecast/trunk/icecast/; revision=10012
parent
7838940f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
src/logging.c
src/logging.c
+11
-6
No files found.
src/logging.c
View file @
477d44dd
...
...
@@ -95,12 +95,11 @@ int get_clf_time (char *buffer, unsigned len, struct tm *t)
}
#endif
/*
** ADDR
USER AUTH
DATE REQUEST CODE BYTES REFERER AGENT [TIME]
** ADDR
IDENT USER
DATE REQUEST CODE BYTES REFERER AGENT [TIME]
**
** ADDR = client->con->ip
** USER = -
** we should do this for real once we support authentication
** AUTH = -
** IDENT = always - , we don't support it because it's useless
** USER = client->username
** DATE = _make_date(client->con->con_time)
** REQUEST = build from client->parser
** CODE = client->respcode
...
...
@@ -116,7 +115,7 @@ void logging_access(client_t *client)
struct
tm
thetime
;
time_t
now
;
time_t
stayed
;
char
*
referrer
,
*
user_agent
;
char
*
referrer
,
*
user_agent
,
*
username
;
now
=
time
(
NULL
);
...
...
@@ -137,6 +136,11 @@ void logging_access(client_t *client)
stayed
=
now
-
client
->
con
->
con_time
;
if
(
client
->
username
==
NULL
)
username
=
"-"
;
else
username
=
client
->
username
;
referrer
=
httpp_getvar
(
client
->
parser
,
"referer"
);
if
(
referrer
==
NULL
)
referrer
=
"-"
;
...
...
@@ -146,8 +150,9 @@ void logging_access(client_t *client)
user_agent
=
"-"
;
log_write_direct
(
accesslog
,
"%s -
-
[%s]
\"
%s
\"
%d "
FORMAT_UINT64
"
\"
%s
\"
\"
%s
\"
%lu"
,
"%s -
%s
[%s]
\"
%s
\"
%d "
FORMAT_UINT64
"
\"
%s
\"
\"
%s
\"
%lu"
,
client
->
con
->
ip
,
username
,
datebuf
,
reqbuf
,
client
->
respcode
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment