[wpkg-users] Log Files

heiko.helmle at horiba.com heiko.helmle at horiba.com
Tue Nov 27 08:24:57 CET 2012

> ..., because there is always something missing from the log on the 
> server, if it is done by a package.
> It is best to do it after WPKG.js is called, which can be accomplished 
> by a post action in WPKG client or a line in the batch file executing 
> WPKG.js

I've done this inside of WPKG - the trick is to spawn the package process 
(on execute='changed' in my case), let wpkg continue and the spawned 
process waits for wpkg to end and only then touches the log

this combination will ftp the log to the server only if an error is 

<package id='reporterror'
        name='Report Packaging Errors'
        <install cmd='"%TOOLDIR%\curl.exe" -f -s 
http://wpkg/wpkg/scripts/reporterrors.cmd -o 
                        <check type='logical' condition='not'>
                                <check type='file' condition='sizeequals' 
path='%TOOLDIR%\reporterrors.cmd' value='324' />
        <install cmd='"%COMSPEC%" /C start "reporterrors" "%COMSPEC%" /C 

        <upgrade include='install'/>

with reporterrors.cmd being this:
goto test
ping localhost
reg query HKEY_LOCAL_MACHINE\SOFTWARE\WPKG /v running | find "true"
if %ERRORLEVEL% EQU 0 goto wait

if %ERRORLEVEL% NEQ 0 goto end

"%~dp0\curl.exe" -f -s ftp://wpkg/wpkg-log/ -T 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20121127/04f69de9/attachment-0002.html>

More information about the wpkg-users mailing list