WinDbg series --- log commonly used commands related to the operation command log *

.logopen (Open Log File)

.logopen command sends a copy of the order of events and commands from the debugger window to the new log file.
.logopen [Options] [FileName] 
.logopen /d

parameter:

  • Options
    one of the following options:
    / t --- with the process id of the current date and time appended to the log file name. After inserting this data into the file name and file extension before.
    / U --- written to a log file in Unicode format. If this option is omitted, the debugger will be written to a log file ascii (ansi) format.
  • FileName
    Specify the log file name. You can choose a complete path or just the file name. If the file name contains a space, then closed the file name in the quota tag. If you do not know one way, demodulator uses the current directory. If you enter the file name of the demodulator is the file DBGENG.LOG.
  • / d
    is automatically selected based on the file name and the name of the target state target process or the target computer. The file extension is always .log.

surroundings:

mode

In user mode, kernel mode

aims

Real-time crash dump

platform

Complete

If the open command to open the log file has been running .log, the debugger will close the file. If the specified file name already exists, the contents of the file will be overwritten. logopen / t command process id, date and time appended to the log file name. In the following example, the hex process id is 0x02bc, the date is September 21, 2019, the time is 15: 21: 05.597.

0:000> .logopen /t c:\logs\mylogfile.txt
Opened log file 'c:\logs\mylogfile_154c_2019-09-21_15-21-05-597.txt'

.logclose (Close Log File)

.logclose command closes all open log files
.logclose 

surroundings:

mode

In user mode, kernel mode

aims

Real-time crash dump

platform

Complete

0:000> .logclose
Closing open log file c:\logs\mylogfile_154c_2019-09-21_15-21-05-597.txt

.logappend (Append Log File)

.logappend command to copy the event and commands from the debugger command window attached to the specified log file.

.logappend [/u] [FileName]

parameter:

  • / u
    written to the log file in Unicode format. If omitted, the debugger will be written to ASCII log file (ANSI) format. When attached to an existing log file, log file is created only when using the / u option, should use the / u parameter. Otherwise, the log file will contain the ascii and unicode characters, which may increase the difficulty of reading.
  • FileName
    Specify the log file name. You can choose a complete path or just the file name. If the file name contains a space, then closed the file name in the quota tag. If you do not know one way, demodulator uses the current directory. If you enter the file name of the demodulator is the file DBGENG.LOG.

surroundings:

mode

In user mode, kernel mode

aims

Real-time crash dump

platform

Complete

If you have to open the log file when you run .logappend command, the debugger will close the log file. If you specify the name of the file already exists, the debugger will append new information to the file. If the file does not exist, the debugger will create the file.
0:000> .logappend c:\logs\mylogfile_154c_2019-09-21_15-21-05-597.txt
Opened log file 'c:\logs\mylogfile_154c_2019-09-21_15-21-05-597.txt'

.logfile (Display Log File Status)

.log file command to determine whether there is a log file and displays the status of the file.

.logfile 

surroundings:

mode

In user mode, kernel mode

aims

Real-time crash dump

platform

Complete

0:000> .logfile
Log 'c:\logs\mylogfile_154c_2019-09-21_15-21-05-597.txt' open for append

 

Guess you like

Origin www.cnblogs.com/yilang/p/11563325.html