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
1: Binary logThe binary log records all DDL(data definition Language) statements and DML(Data Manipulation language) statements, but does not record statements that include data queries. Statements are saved as "events," which describe the process of changing the data, which plays an extremely important role in recovering data during a disaster.2: Location and format of the logWhen started with the -
='oracle@szdb.com'# ----------------------------------------------# check the database is running, if not exit# ----------------------------------------------db_stat=`ps -ef | grep pmon_$ORACLE_SID | grep -v grep| cut -f3 -d_`if [ -z "$db_stat" ]; then date >/tmp/db_${ORACLE_SID}_stauts.log echo " $ORACLE_SID is not available on ${MACHINE} !!!" >>/tmp/db_${ORACLE_SID}_stauts.log MAIL_SUB=" $ORACLE_SID is not available on ${MACHINE} !!!" $MAIL_DIR/sendEmail -u $MAIL_SUB -f $MAIL_FM -
Recently, encountered the MySQL master and slave library synchronization problem, mainly because the computer broke a bit of electricity, toss AH.Error from library log: Last_io_error:got fatal error 1236 from master, reading data from binary log: ' could ' Name in binary log index file '
Solution:
1. First stop sync
LoCatIon ~ . * \. (Gif | jpg | jpeg | png | bmp | swf) ${
ExPires 30d; access_log off; // adding this line will not record these file types}
Location ~ . * \. (Js | css )? $ {Expires 12 h; access_log off; // records are not allowed}
Location ~ . * \. (Html | htm) $ // This part is not originally available. We only re
the minimum number of files during the inactivity period of the instruction parameter in Open_file_cache. OPEN_FILE_CACHE_ERRORS Specifies whether to cache error messages when searching for a file, including configuringTo add files to the. We also include server modules, which are defined in different files. If your server module is not in these locations, you will have to modify this line to specify the correct
%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
Original address: http://huanyue.iteye.com/blog/574598
log4j when you specify the location of the log file is to use absolute path, so when the deployment environment is very cumbersome to change, find a number of methods on the Internet, personal feeling the following methods are more applicable:
Because spring also loads log4j.properties,
Visual C ++ 5th and 6. However, other C compilers, Java, and Visual Basic have the same functions.First, let's see how to build the debugging version of the client code you want to debug. Load the project file to Microsoft Developer Studio and complete the following steps:1. Click create activation configuration in the create menu.2. Select debug configuration from the dialog box and click OK.3. Click settings in the project menu, and then click the
Log4j.properties:# define the DEBUG priority, R for the purpose of the log outputLog4j.rootlogger= DEBUG, R# Set the log output type to file typeLog4j.appender.r= Org.apache.log4j.FileAppender# Set the location of the log filesLog4j.appender.r.file=. /visitemanage/logs/logre
/binlog sr0 11:0 1 8.1G 0 rom Second, implement data and binary log separation1, modify the permissions of two directories chown -R mysql.mysql /mysql/2. Modify the MySQL configuration file vim /etc/my.cnf 在[mysqld]这个语句块下修改这两项 [mysqld] datadir=/mysql/data log_bin=/mysql/binlog/mysql-binlog3, restart MARIADB service systemctl restart mariadb systemctl enable m
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
Nginx logging and formatting, configured in the master configuration fileVim/usr/local/nginx/conf/nginx.confIn this lineLog_format combined_realip ' $remote _addr $http _x_forwarded_for [$time _local] '' $host ' $request _uri "$status"' "$http _referer" "$http _user_agent";Combined_realip is the name of the log and can be customized. such as: WYP$remote _addr Remote IP$http IP for _x_forwarded_for proxy[$time _local] Time$host Domain Name$request _uri
Tags: Exchange justify database Style mailboxMove Mailbox databases and logs, 3 steps will be performed
If the target database is already loaded, dismount the mailbox database first;
Migrating the target mailbox database;
Loading the mailbox database;
Uninstalling the Mailbox database650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/85/70/wKioL1ejUtCyKoPFAAB_nrAyILE560.png "/>Migrating mailbox databases and log filesThe
Move log files Firstmv/usr/local/openresty/nginx/logs/access.log/usr/local/openresty/nginx/logs/access.log.20161024Send signal to reopen log fileKILL-USR1 $ (cat/usr/local/openresty/nginx/logs/nginx.pid)Simply explain:1, before the execution of KILL-USR1 ' cat ${pid_path} ', even if the file has been the MV command has only changed the name of the
Monitoring log file size is a very important task, and SQL Server has made it easy for us to do so. One way to find out about the log information is in catalog view sys.database_files. This view returns information about the log file, including the
very usefulAuthType Basic//authentication type, generally basicAUTHUSERFILE/DATA/.HTPASSWD//Specify the location of the password fileRequire Valid-user//specify that users who require authentication are all available usersErrorlog "Logs/111.com-error_logo"Customlog "Logs/111.com-access_log" commonPS: In the configuration of the best to remove the instructions, in case of error 2, create "httpd-vhosts.conf" in the specified password
permissions of the soft link file, different from the original file4, modify any file, the other changes5, delete the original file, soft links can not be usedLess restrictive, and flexible[[email protected] ~]# lsAnacondalks.cfg Cangls Install.log Install.log.syslog[Ro[email protected] ~]# ln-s/root/anaconda-ks.cfg/tmp/cangls.soft[Email protected] ~]# Ln/root/c
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.