首先是编译,安装log4cplus。
第二是对API进行封装,代码如下:
log.h
#ifndef _LOG_H_
#define _LOG_H_
#include
#define DEBUG(input) DEBUG_LOG((input), (__FILE__), (__LINE__));
#define ERROR(input) ERROR_LOG((input), (__FI...
分类:
其他好文 时间:
2015-02-10 20:21:20
阅读次数:
191
Nginx的内核模块Nginx的内接模块用于控制Nginx服务器的基本功能配置实例:usernobodynobody;
worker_processes4;
error_loglogs/error.logcrit;
pidlogs/nginx.pid;
worker_rlimit_nofile65535;指令名称:error_log指令名称:pidNginx的事件模块事件模块(EventModules)用于控制Ngi..
分类:
其他好文 时间:
2015-02-08 23:21:31
阅读次数:
216
注意 这里不是php-fpm ? 在php.ini 中找到如下信息 搜索php_error ; Log errors to specified file. PHP‘s default behavior is to leave this value ; empty. ; http://php.net/error-log ; Example: ;error_l...
分类:
Web程序 时间:
2015-02-03 15:26:51
阅读次数:
192
一、NGINX内置的基本模块
1、NGINX内核模块
2、EVENTS模块
3、HTTP核心模块
二、NGINX基本配置文件
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log inf...
分类:
其他好文 时间:
2015-02-03 01:53:48
阅读次数:
177
Connection reset by peer这个错误是在nginx的错误日志中发现的,为了更全面的掌握nginx运行的异常,强烈建议在nginx的全局配置中增加error_log logs/error.log notice;这样,就可以记录nginx的详细异常信息。nginx的错误日志中会出现C...
分类:
Web程序 时间:
2015-01-30 20:59:44
阅读次数:
192
Nginx配置文件详细说明在此记录下Nginx服务器nginx.conf的配置文件说明, 部分注释收集与网络.#运行用户user www-data; #启动进程,通常设置成和cpu的数量相等worker_processes 1;#全局错误日志及PID文件error_log /var/log/ngin...
分类:
其他好文 时间:
2015-01-30 17:14:56
阅读次数:
187
#定义Nginx运行的用户和用户组user www www;#nginx进程数,建议设置为等于CPU总核心数。worker_processes8;#全局错误日志定义类型,[ debug | info | notice | warn | error | crit ]error_log /var/log...
分类:
其他好文 时间:
2015-01-29 18:58:14
阅读次数:
164
#运行用户
user www-data;
#启动进程,通常设置成和cpu的数量相等
worker_processes 1;
#全局错误日志及PID文件
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
#工作模式及连接数上...
分类:
其他好文 时间:
2015-01-29 17:53:54
阅读次数:
169
user nginx nginx ; Nginx用户及组:用户 组。window下不指定 ? worker_processes 8; 工作进程:数目。根据硬件调整,通常等于CPU数量或者2倍于CPU。 ? error_log? logs/error.log;? error_log? logs...
分类:
其他好文 时间:
2015-01-28 16:09:40
阅读次数:
276
#定义Nginx运行的用户和用户组user www www;#nginx进程数,建议设置为等于CPU总核心数。worker_processes8;#全局错误日志定义类型,[ debug | info | notice | warn | error | crit ]error_log /var/log...
分类:
其他好文 时间:
2015-01-27 18:09:57
阅读次数:
133