LogEx plug-in: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
Jpderuiter (talk | contribs) No edit summary |
Jpderuiter (talk | contribs) No edit summary |
||
Line 50: | Line 50: | ||
==Example== | ==Example== | ||
<highlight-nsis>LogEx::Init /NOUNLOAD "$TEMP\log.txt"</highlight-nsis> | |||
== Notes == | == Notes == |
Revision as of 00:48, 13 February 2007
Author: jpderuiter (talk, contrib) |
Links
Description
Version: 0.1.
LogEx is a logging plugin. It allows to append a string to a logfile and show this string in the status listbox and/or the status bar (like DetailPrint)
How To Use
The most practical way to use this plugin is disabling the PluginUnload. To do this call "SetPluginUnload alwaysoff" in all functions and sections where you use this plugin. ...
Init DLL Function
LogEx::Init /NOUNLOAD FileName
- FileName
- Log file name. The file will be opened with FILE_APPEND_DATA, so evt. old data will be left untouched.
Write DLL Function
LogEx::Write /NOUNLOAD LogString [bWriteToStatusList] [bWriteToStatusBar]
- LogString
- String to write to the logfile.
- bWriteToStatusList
- If equal to true, adds the string to the Status Listbox.
- bWriteToStatusBar
- If equal to true, adds the string to the Status Bar.
AddFile DLL Function
LogEx::AddFile /NOUNLOAD FileName Prefix
- FileName
- File to add to the logfile.
- Prefix
- Prefix to add at the beginning of each new line.
Close DLL Function
LogEx::Close
Example
LogEx::Init /NOUNLOAD "$TEMP\log.txt"
Notes
The LogEx::AddFile function is especially usefull in combination with execution of a console application (like ExecDos plug-in)
Version History
[version 0.1: 2007-02-12] Initial version.
JP de Ruiter