http://bugzilla.wpkg.org/show_bug.cgi?id=79
Leon Hedding <[EMAIL PROTECTED]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[EMAIL PROTECTED]
--- Comment #26 from Leon Hedding <[EMAIL PROTECTED]> 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.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
-------------------------------------------------------
Easy Software Deployment >> http://wpkg.org
_______________________________________________
wpkg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wpkg-users