blob: 5cab782d6c3531883a6637d7b3c91990a9ed7ab9 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
#ifndef LOG_MESSAGE_HANDLER_H_
#define LOG_MESSAGE_HANDLER_H_
extern "C" {
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
#include <ngx_log.h>
}
namespace net_instaweb {
namespace log_message_handler {
// Install a log message handler that routes LOG() messages to the
// server error log. Should be called once at startup. If server blocks define
// their own logging files you would expect that LOG() messages would be routed
// appropriately, but because logging is all done with global variables this
// isn't possible.
void Install(ngx_log_t* log_in);
} // namespace log_message_handler
} // namespace net_instaweb
#endif // LOG_MESSAGE_HANDLER_H_