Prev Previous Post   Next Post Next
Old 13th February 2007, 00:43   #1
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
LogEx plugin

I have created a new Logging plugin:
http://nsis.sourceforge.net/LogEx_plug-in

With this plugin you can:
- Open a new or existing logfile, and append strings to it.
- Copy this string to the Status Listbox and/or Statusbar. (like DetailPrint)
- Append an existing file to the log file (esp. usefull when executing a console app)
--- Add a prefix to each new line of this file.
--- Choose which lines from this file to append.

Example:

code:

LogEx::Init /NOUNLOAD "$TEMP\log.txt"
LogEx::Write /NOUNLOAD "Write this line to the log file only"
LogEx::Write /NOUNLOAD "Write this line to the log file and the status list box" true
LogEx::Write /NOUNLOAD "Write this line to the log file, the status list box and \
the statusbar" true true
LogEx::Write /NOUNLOAD 'Write complete "dir" output to the log file with ">" as prefix'
ExecDos::exec 'cmd /C dir' "" "$TEMP\output.log"
LogEx::AddFile /NOUNLOAD "$TEMP\output.log" ">"
LogEx::Write /NOUNLOAD 'Write "dir" output from line3 to the log file'
ExecDos::exec 'cmd /C dir' "" "$TEMP\output.log"
LogEx::AddFile /NOUNLOAD "$TEMP\output.log" "" 3
LogEx::Write /NOUNLOAD 'Write "dir" output from line3 to line6 to the log file'
ExecDos::exec 'cmd /C dir' "" "$TEMP\output.log"
LogEx::AddFile /NOUNLOAD "$TEMP\output.log" "" 3 6
LogEx::Close



Please give your comments.

JP de Ruiter
jpderuiter is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump