This article reprinted to http://dingran.iteye.com/blog/1773573For the real machine, the log can not be saved, difficult to analyze the problem. Therefore, it is necessary to save the log to the application's Docunment directory and set it as a shared file so that the analysis can be removed.The first is the log output
format= '% (asctime) s-% (pathname) s[line:% (Lineno) d]-% (levelname) s:% (message) s ' # Log format )If you set filename and FileMode in Logging.basicconfig (), only log to file will be saved and not output to the console.Third, the previous screen input, also write to the
: This article describes how to write logs in custom log files of Yii2. For more information about PHP tutorials, see. Introduce the log class to the header
Use yii \ log \ FileTarget;
$ Time = microtime (true );$ Log = new FileTarget ();$ Log-> logFile = Yii: $ app-> ge
Tags: log mod successfully record file real-time Shel family styleUsing Prompt_command to implement the command audit function:Record what users, at what time, what to do, and then record the information found in a file.Specific operation:Append the following to/etc/profile:############ #日志审计chmod +s/usr/bin/chmod >/dev/null #让普通用户能建立目录及文件chmod +s/usr/bin/chown >/dev/null #让普通用户能建立目录及文件mkdir-p/var/
RECOVERY full with no_wait GO ALTER database dnname SET RECOVERY full--Also The original full mode GO SQL2005 Empty Delete log: Backup Log dnname with No_log ' Here's dnname is the name of the database you want to shrink, and I'm not going to comment anymore by changing the database name below.
go
dump Transaction dnname with no_log
go use
dnname
DBCC shrinkfile (2)
go sqlserver2000 Compression LogYou can
Log status in Android is very important, if as an Android programmer can not analyze log this, is not an introduction to Android. Now let's talk about how to handle the log file.When will a log file be generated? A log
MongoDB log files in the case of setting logappend=true, will continue to the same log file appended, long time, naturally become very large.The solution is as follows: (Special note: The log path must be--logpath specified when booting)Use MONGO to connect to the server-side copy code code as follows:Use admin//Switch
When debugging a mobile phoneProgramWhen an error occurs, we can get the error message,
When we use a real machine for Android Application debugging, we cannot obtain the debugging information. The error message is as follows: Unable to open log device '/dev/log/main': no such file or directory.
This is because our mobile phone has not enabled the
SQL 2008 log Files account for 23G of hard disk space, and the transaction log has been truncated (Truncate), the actual log content is small, 1G is not, want to release the extra space occupied by the log files.
However, no matter how you shrink (Shrink) log files, space i
I used log4j in a struts project and posted it on Tomcat, but when I started Tomcat it was always impossible to specify the location of the log file.
If you specify this, when you start Tomcat, you always say that you cannot find the log file.
Log4j.appender.logfile.file=log
Write log information to the server log file file, toss a big circle finally found the solution, the specific contents are as follows:
Toss:
How to write classes and how to use classes in "Logging" PHP
A, configurable, generic, log system needs to be sorted out.
Supports
[Architecture] MySQL Log File-Error Log (I) What is it? Record detailed information about MySQL Server startup and shutdown, and serious warnings and error messages during running [SQL] mysql> show variables like 'Log _ error '; + --------------- + response + | Variable_name | Value | + ----------------- + ------------
Tags: mysql5.7 undo log Table Space ReclamationThe Undo log rollback log is saved in the shared tablespace ibdata1 file, and as the business keeps running, the ibdata1 file becomes larger and more difficult and complex to reclaim (shrinking space size), you must first mysqld
Use Yii\log\filetarget;$time = Microtime (true);$log = new Filetarget ();$log->logfile = Yii:: $app->getruntimepath (). " /logs/a.log ';$log->message[] = [' Test ', 1, ' Application ', $time];$log->export ();/** [0] = = Message (mixed, can be a string or some complex data, s
/var/log/messages -Includes overall system information, which also contains logs during system startup. In addition,mail,cron,daemon,Kern and Auth and other content are also recorded in the var/log/messages log. /VAR/LOG/DMESG -Contains kernel buffering information ( Kernel ring Buffer ). When the system starts, many
Tags: run backup file management clears CTI Trunc set DBCC SQL2008 's shrink log due to SQL2008 's optimization of file and log management, the following statements can be run in SQL2005 but have been canceled in SQL2008: (SQL2005) Backuplog dnname withno_logGo
Dump TransactionDnname withno_logGo
UseDnnameDBCCShrinkfi
The most recent projects are the archiving of data, pulling data from one database to another, resulting in a very large log file for the new database, or the fact that the database is being used to increase the log files, which can degrade the performance of the database and consume a lot of disk space. So I want to delete the
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.