![]() |
Simple Text File Logging Macro
I just made my first contribution to the Wiki: a Simple Text File Logging Macro.
It also provides an example which shows the order in which sections and functions are executed by NSIS. Since I'm really a newbie to NSIS, will you NSIS gurus take a second to look at my contribution and make any comments and/or suggestions so that I can improve the quality of my NSIS code and any potential future contributions to the wiki? Thanks in advance. |
Seems fine, thanks for the contribution.
There are, however, a couple of problems. First of all, there's no need to put the page in those three categories. Logging Functions is a subcategory of Functions & Macros and Code Examples doesn't really fit as the example is just an example for the function. Beside that, there's a little bug in the code. LOG_SET_FILE_NAME resets $__TextLogState, if the log is already open. I have added the following text to the documentation. It should explain the problem. Quote:
|
Quote:
I've rearchitected the include using what I've learned about NSIS and other's add-ons over the past several days, and the link is here: Logging: Simple Text File Logging Functions and Macros. If you have time and don't mind, I would appreciate it you could eyeball this version too, for styles as well as for substance. I have other things I might be able to contribute, but I'd like to make sure I contribute things that are consistent with the coding-style representative of the NSIS community. |
Nice,
I would however chance the Wiki example Function .onInit ${LogSetFileName} "$INSTDIR\MyInstallLog.txt" to write the file to the users temp directory since the log does not really belong to the installed program. But hey, I'm a nitpicker ;) |
A couple more:
|
| All times are GMT. The time now is 04:56. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.