[wpkg-users] [Bug 79] Major WPKG enhancements, remote logging, doc, internal restructuring

bugzilla-daemon at bugzilla.wpkg.org bugzilla-daemon at bugzilla.wpkg.org
Mon Nov 12 12:00:14 CET 2007


http://bugzilla.wpkg.org/show_bug.cgi?id=79


Leon Hedding <leon.hedding at ict.om.org> changed:

           What    |Removed                     |Added

                 CC|                            |leon.hedding at ict.om.org




--- Comment #26 from Leon Hedding <leon.hedding at ict.om.org>  2007-11-12 12:00:01 ---
Looking through the central logging feature I notice that you are not appending
to the log file by default. I would much prefer having it append by default. I
currently have a rudimentary central logging system that I am using similar to
what you are doing. Use name the log file <hostname>_01.log and have log
rotation when the text file get too large. Below is the code that I am using.
What do you think of log rotation? 

        var shell = WScript.CreateObject( "WScript.Shell" );
        var fso = new ActiveXObject("Scripting.FileSystemObject");
        var strComputer = shell.ExpandEnvironmentStrings( "%COMPUTERNAME%" );
        var logPath = "\\\\wpkg_server\\publish\\wpkg\\" + strComputer +
"_01.log";

        /** log rotation */
        if (fso.FileExists(logPath)) {          
                var file = fso.GetFile(logPath);
                if (file.size > 1048576) {
                        if (fso.FileExists("\\\\wpkg_server\\publish\\wpkg\\" +
strComputer + "_02.log"))
                                fso.DeleteFile
("\\\\wpkg_server\\publish\\wpkg\\" + strComputer + "_02.log");
                        fso.MoveFile (logPath,
"\\\\wpkg_server\\publish\\wpkg\\" + strComputer + "_02.log");
                }
        }


-- 
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


wpkg-users mailing list
wpkg-users at lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users



More information about the wpkg-users mailing list