Daemon.*-/var/log/daemon.log
Copy CodeDefines the location where logs generated by Daemon are saved, where daemon is the log type, and "*" means that all levels of logs are placed in the file. The format is: facility. Level-the path where log files are saved, such as-/var/
Write System logs in C language in Linux
__________________________________________________________________________________________________
Author: jobo
Time: 2011/11/24
Emaile: jibo.tiger@gmail.com
Statement: I am not opposed to reprinting my articles by other people and groups, but please indicate the source, 3q. If you have any questions about this article
Leave a message in the blog or send an emaile to contact me (you cannot reply in time. The time is limited. Please forgive me)
___________
-l logs/access-% Y-% m-% d. log 86400 Prime; common This is simple. Just put it in. The error log is shown below.This section describes windows users. linux uses cronolog to separate apache logs.The cronolog tool can be run in linux or on a windows host. The installation method of linux is very
Specifies that the Apache log generates one file per day
Linux System Configuration Method
Found in Apache's configuration file httpd.conf
The code is as follows
Copy Code
ErrorLog Logs/error_logCustomlog Logs/access_log CommonChange it toErrorLog "| /usr/local/apache/bin/rotatelogs/home/logs/www/%y_%m_%d_error_log 86400 480 "Custom
1. # vim/usr/local/apache2/conf/extra/httpd-vhosts.confModify the log file to:Errorlog "Logs/test.com-error_log" error logCustomlog "Logs/test.com-access_log" combined access log relative pathApache's Common log format definition:# vim/usr/local/apache2/conf/httpd.conf# The following directives define some format nickn
number of minutes of the time difference relative to UTC. If omitted, it is assumed to be "0" and UTC time is used. For example, to specify local time for a region with a UTC difference of "-5 hours", this parameter should be "
-300 ".
filesizeM
specifies scrolling as a
filesizeM file size instead of scrolling by time or slack.
Examples of settings under
Accidentally found that the Access.log is 21G large, so cut it.Nginx is a very lightweight Web server, small size, high performance, fast, and many other advantages. But shortcomings are also shortcomings, such as the resulting access log file has been one, will not be automatically cut, if the traffic is very large, will result in a very large log
third step: the corresponding modification of the attributes, before the change must know what these are doing, in the second part of the explanation.
Step Fourth: Add the relevant statement to the class where you want to output the log:
Define attributes: Protected final log = Logfactory.getlog (GetClass ());
In the appropriate method:
if (log.isdebugenabled ()) {
Log.debug ("System ...");
}
Ii. Descript
The function of binary log files
The MySQL binary log file is used to record all users ' operations on the database, that is, the SQL statements that record user operations on the database. If you have this file, when the database is an accident, you can see through this file
Configure the relative path of the log file in Log4j
Method 1: the solution is to replace the absolute path with the relative path. In fact, the FileAppender of log4j has such a mechanism, such as log4j. appender. logfile. file =$ {WORKDIR}/logs/app. log"$ {WORKDIR}/" is a variable and will be replaced by the value of
Issue: Login server times No monitoring serviceCheck the steps:1. Enter Sqlplus to view the status of the database, showing that the current database status is openScript: Select status from V$instance;2, check the database monitoring service, log in to find that the speed of entering the listener is very slowScript: Lsnrctl Status3, check the size of the listening log, the location is as follows:$ORACLE _b
Carly Jacob bson wrote, "server logs are log files created and updated by a server. A common example is the access log generated by Apache (open source web server software), which provides the history of web page requests. However, Apache not only collects access information, but also collects relevant information for error logs, as well as collection of ID file
Log4j.appender.f.file=c:/logs/logger.log Log4j.appender.f.layout=org.apache.log4j.patternlayout log4j.appender.f.layout.conversionpattern=%d{[ EMAILNBSP;PROTECTED]:MM:SS,SSS}%-5p (%13f:%l)%3x–%m%n #Addon forCom.sun.faces.level=fine****************************Local Integration development Testing1. Add the log4j jars to the project.2. Create a new log4j.properties and place it into the MyClasses directory and add the following to it3.log4j.properties content (This
, to realize the dual-machine hot standby first to understand the requirements of the master and slave database server version. To achieve a hot standby version of MySQL is higher than 3.2, there is also a basic principle is that the database version from the database can be higher than the primary server database version, but not lower than the primary server version of the database. 3, set up the primary database server: A. First, see if the version of the primary server is a backup-hot vers
. Modify the corresponding configuration file AWStats in C: \ Program Files \ awstats \ wwwroot \ cgi-bin. myvirtualhostname. conf (myvirtualhostname is the domain name entered in step 4th for you, for example, www.cnblogs.com ). Modify the following items:LogFile = "C: \ WINDOWS \ System32 \ LogFiles \ W3SVC1 \ ex % YY-0 % MM-0 % DD-0.log"
LogFormat = 2
AllowTo
%p: Output log information priority, i.e. Debug,info,warn,error,fatal,%d: the date or time of the output log point-in-time, the default format is ISO8601, or the format can be specified thereafter, for example:%d{yyy MMM dd hh:mm:ss,sss}, Output is similar: October 18, 2002 22:10:28,921%r: The number of milliseconds to output from the application boot to the output of this
becomes an "unexpected operation "). This is usually completed by using try/catch t packaging in C ++. A Package refers to a piece of code, which wraps a part of the code and allows you to isolate it. In the try/catch packaging, if the code in the try part causes an accident, the catch/catch T code is called to solve this problem. If the problem can be solved, the above error will not cause system failure.The last entry you see is the same as the C ++ accident, but the accident you see is handl
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.