mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
fix win32 access.log entries, the rest is just cosmetic
svn path=/icecast/trunk/icecast/; revision=9307
This commit is contained in:
parent
5b9e7f1660
commit
dc0d4e15fd
@ -119,11 +119,11 @@ void logging_access(client_t *client)
|
|||||||
|
|
||||||
now = time(NULL);
|
now = time(NULL);
|
||||||
|
|
||||||
localtime_r (&now, &thetime);
|
localtime_r (&now, &thetime);
|
||||||
/* build the data */
|
/* build the data */
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
memset(datebuf, '\000', sizeof(datebuf));
|
memset(datebuf, '\000', sizeof(datebuf));
|
||||||
get_clf_time(datebuf, sizeof(datebuf)-1, &thetime);
|
get_clf_time(datebuf, sizeof(datebuf)-1, &thetime);
|
||||||
#else
|
#else
|
||||||
strftime (datebuf, sizeof(datebuf), LOGGING_FORMAT_CLF, &thetime);
|
strftime (datebuf, sizeof(datebuf), LOGGING_FORMAT_CLF, &thetime);
|
||||||
#endif
|
#endif
|
||||||
@ -144,20 +144,21 @@ void logging_access(client_t *client)
|
|||||||
if (user_agent == NULL)
|
if (user_agent == NULL)
|
||||||
user_agent = "-";
|
user_agent = "-";
|
||||||
|
|
||||||
log_write_direct (accesslog, "%s - - [%s] \"%s\" %d %lld \"%s\" \"%s\" %u",
|
log_write_direct (accesslog,
|
||||||
client->con->ip,
|
"%s - - [%s] \"%s\" %d " FORMAT_UINT64 " \"%s\" \"%s\" %lu",
|
||||||
datebuf,
|
client->con->ip,
|
||||||
reqbuf,
|
datebuf,
|
||||||
client->respcode,
|
reqbuf,
|
||||||
client->con->sent_bytes,
|
client->respcode,
|
||||||
referrer,
|
client->con->sent_bytes,
|
||||||
user_agent,
|
referrer,
|
||||||
stayed);
|
user_agent,
|
||||||
|
(unsigned long)stayed);
|
||||||
}
|
}
|
||||||
/* This function will provide a log of metadata for each
|
/* This function will provide a log of metadata for each
|
||||||
mountpoint. The metadata *must* be in UTF-8, and thus
|
mountpoint. The metadata *must* be in UTF-8, and thus
|
||||||
you can assume that the log itself is UTF-8 encoded */
|
you can assume that the log itself is UTF-8 encoded */
|
||||||
void logging_playlist(char *mount, char *metadata, long listeners)
|
void logging_playlist(const char *mount, const char *metadata, long listeners)
|
||||||
{
|
{
|
||||||
char datebuf[128];
|
char datebuf[128];
|
||||||
struct tm thetime;
|
struct tm thetime;
|
||||||
|
@ -89,15 +89,8 @@ extern int playlistlog;
|
|||||||
#define LOGGING_FORMAT_CLF "%d/%b/%Y:%H:%M:%S %z"
|
#define LOGGING_FORMAT_CLF "%d/%b/%Y:%H:%M:%S %z"
|
||||||
|
|
||||||
void logging_access(client_t *client);
|
void logging_access(client_t *client);
|
||||||
void logging_playlist(char *mount, char *metadata, long listeners);
|
void logging_playlist(const char *mount, const char *metadata, long listeners);
|
||||||
void restart_logging (ice_config_t *config);
|
void restart_logging (ice_config_t *config);
|
||||||
|
|
||||||
#endif /* __LOGGING_H__ */
|
#endif /* __LOGGING_H__ */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user