mirror of
https://github.com/ceph/ceph
synced 2025-01-03 01:22:53 +00:00
rgw: use a separate callback for civetweb access log
Access log is separate from the regular civetweb logging. Also, changed the log level for the regular logging as it's used mostly for error messages. Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
parent
850242cad7
commit
00c677b4b6
@ -1 +1 @@
|
||||
Subproject commit ebf869ab50a070a3580ec4303c2aaf278bd73d24
|
||||
Subproject commit 92b43ae376fb87b284ae7acf1d459b0008e7d69e
|
@ -7,7 +7,12 @@
|
||||
|
||||
|
||||
int rgw_civetweb_log_callback(const struct mg_connection *conn, const char *buf) {
|
||||
dout(10) << "civetweb: " << (void *)conn << ": " << buf << dendl;
|
||||
dout(0) << "civetweb: " << (void *)conn << ": " << buf << dendl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rgw_civetweb_log_access_callback(const struct mg_connection *conn, const char *buf) {
|
||||
dout(1) << "civetweb: " << (void *)conn << ": " << buf << dendl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2,5 +2,6 @@
|
||||
#define CEPH_RGW_CIVETWEB_LOG_H
|
||||
|
||||
int rgw_civetweb_log_callback(const struct mg_connection *conn, const char *buf);
|
||||
int rgw_civetweb_log_access_callback(const struct mg_connection *conn, const char *buf);
|
||||
|
||||
#endif
|
||||
|
@ -939,6 +939,7 @@ public:
|
||||
memset((void *)&cb, 0, sizeof(cb));
|
||||
cb.begin_request = civetweb_callback;
|
||||
cb.log_message = rgw_civetweb_log_callback;
|
||||
cb.log_access = rgw_civetweb_log_access_callback;
|
||||
ctx = mg_start(&cb, &env, (const char **)&options);
|
||||
|
||||
if (!ctx) {
|
||||
|
Loading…
Reference in New Issue
Block a user