Differences
This shows you the differences between the selected revisions of the page.
ui_pref_logging 2005-02-08 | ui_pref_logging 2023-11-22 (current) | ||
Line 1: | Line 1: | ||
- | ====== Logging Tab ====== | + | ====== The Logging Page (Preferences Dialog) ====== |
- | //Logging tab// allows user to configure session logging. For easier access before opening a session, the tab is duplicated on [[ui_login_logging|Login dialog]]. | + | The //Logging page// on the [[ui_preferences|Preferences dialog]] allows user to configure [[logging|session and XML logging]].· |
- | &screenshotpict(login_logging) | + | &screenshotpict(pref_logging) |
- | To enable logging tick //Enabled logging// checkbox. | + | &toc_title_page_sections |
- | Once the logging is enabled, you can configure the //Logging options//. | + | ===== [[session_log]] Session log ===== |
+ | To enable logging to a file, check //Enable session logging on level//. | ||
- | To enable logging to file tick //Log to file// checkbox and specify log file. If you select //Append// option, and the logging file already exists, session log will be appended to the end of the file. Otherwise the existring file will be overwritten. If you enable logging to file in mid-session the past events will not be written to the log retrospectively. Note that simultaneous logging of several sessions to file is not supported. | + | To increase a verbosity of the session log, select //Debug 1// or //Debug 2// level. You will probably need these (together with a logging to file), when [[reporting|reporting bugs]] only. The //Debug 2// level can significantly deteriorate performace. To decrease a verbosity of the session log, select //Reduced// level. |
- | When you tick //Show log window// checkbox, session log window will appear. For peformance reasons it is recommended to limit number of displayed lines. Note that if you tick //Show log window// checkbox on Login dialog, the log window will appear only after you open the session. Once the session is already opened you can show/hide log window also from //Options// menu and from toolbar. If you display log window in mid-session the past events will be displayed only if the //Enable logging// was already ticked before. | + | Specify [[local_path|local path]] to log file into //Log path// box. Log file name can contain following patterns: ''!Y'' (year), ''!M'' (month), ''!D'' (day), ''!T'' (time), ''!@'' (hostname), ''!S'' (session name), ''!P'' (process ID), ''!!'' (exclamation mark). |
- | ===== Protocol (Low-Level) Logging ===== | + | If you select //Append// option, and the logging file already exists, session log will be appended to the end of the file. Otherwise the existing file will be overwritten. |
- | For debugging reasons WinSCP allows low-level protocol logging (SFTP only). To enable it you have to edit [[config|configuration]] manually. | + | |
- | First make sure that WinSCP is not running. | + | You can limit a log file size by specifying a maximum size in bytes in //Rotate log files after reaching// box. Supported units are ''K'', ''M'' and ''G''. If a log file reaches the configured limit, it is archived to a file with extension ''.1'', ''.2'', etc. You can limit number of archived log files using //Delete old logs files, keep ... files// checkbox. |
- | If you are using Window Registry (the default) as configuration storage import following REG file (store the following lines to ''logging.reg'' file and double-click it): | + | If you enable logging to file in mid-session the past events will not be written to the log retrospectively. Note that to log several sessions simultaneously to file, you need to ensure unique names of the log files (e.g. using some of the patterns above). Passwords are not written to log file. |
- | <code> | + | |
- | REGEDIT4 | + | |
- | [HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Configuration\Logging] | + | Tick //Log passwords and other sensitive information// to turn off obfuscation of passwords and other sensitive information in session log. It is useful when debugging authentication issues. |
- | "LogProtocol"=dword:00000002 | + | |
- | </code> | + | |
- | If you are using INI file as configuration storage modify the INI file as follows: | + | ===== [[xml]] XML log ===== |
- | <code> | + | To enable [[logging_xml|XML log]], check //Enable XML logging to file// and specify [[local_path|local path]] to log file. You can use the same patterns as for session log file (see above). |
- | ... | + | |
- | [Configuration\Logging] | + | |
- | ... | + | |
- | LogProtocol=2 | + | |
- | ... | + | |
- | </code> | + | |
- | Then run WinSCP and enable logging to file. The log file will contain more verbose information. | + | It is not possible to change XML log file name in middle of the session. |
+ | |||
+ | ===== Further Reading ===== | ||
+ | Read more about [[ui_preferences|Preferences dialog]] and its other [[ui_preferences#pages|pages]]. |