Menu

#182 Close LOG file when LogSet is set to Off.

closed-accepted
NSIS (71)
5
2008-06-13
2008-06-06
Sheiker
No

Close LOG file when LogSet is set to Off.

Trivial change, makes me wonder if there is a history I don't know about here...

I really do NOT like the fact that the Log file remains locked until the Installer finishes running!

It means we can't DELETE it, if we decide to manipulate the data in the log file, and output our own file.

So now, when LogSet is set to Off, Close the file.
When Logging is set back to On, the file will automagically be opened again.

Simple patch:

cvs diff -u -- exec.c (in directory C:\NSISsrc\NSIS\Source\exehead\)
Index: exec.c
===================================================================
RCS file: /cvsroot/nsis/NSIS/Source/exehead/exec.c,v
retrieving revision 1.199
diff -u -r1.199 exec.c
--- exec.c 8 Sep 2007 17:20:10 -0000 1.199
+++ exec.c 6 Jun 2008 17:44:49 -0000

@@ -1514,7 +1659,10 @@
log_dolog=parm1;
log_printf2("logging set to %d",parm1);
#if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT)
- if (parm1) build_g_logfile();
+ if (parm1)
+ build_g_logfile();
+ else
+ log_write(1);

Discussion

  • Sheiker

    Sheiker - 2008-06-06
    • labels: --> NSIS
     
  • Amir Szekely

    Amir Szekely - 2008-06-13

    Logged In: YES
    user_id=584402
    Originator: NO

    Thanks, applied.

     
  • Amir Szekely

    Amir Szekely - 2008-06-13
    • assigned_to: nobody --> kichik
    • status: open --> closed-accepted
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.