GitHub user sarangan12 opened a pull request:

    https://github.com/apache/cordova-windows/pull/152

    CB-10640: Windows logging is broken

    **Issue**
    In the current system, the logs which are collected in the events must be 
listed in the CI logs is broken. For example, if there is a syntax error in one 
of the plugins, mobilespec(during testing) will crash the app. This information 
is available in event logs. This must be collected in the '[Gathering 
logs](https://ci.apache.org/builders/cordova-windows-store8.1/builds/1660/steps/gathering-logs/logs/stdio)'
 step and be available in CI logs. But, that is not happening and must be 
fixed.  
    
    **Root Cause**
    The issue is traced to 2 cause. 
    
    1. **Query** 
    The query format that was used to retrieve the event logs is incorrect. For 
example, even when the 'View Events Logs' tool reports the error, if you run 
the exact command in command line, it just returns empty results. This query 
format must be fixed. 
    
    2. **spawn**
    The _wevtutil_ command is invoked through spawn (for collecting the event 
logs). This same approach is used in the same program at 4 different places 
(for various reasons). In all other scenarios, the output is correct, But, 
while collecting the event logs, the output is empty. This must be fixed. 
    
    **Fix**
    For Issue 1, the query format has been modified to use _timediff_ 
parameter. This is the approach that is used by the 'View Events Logs' tool. 
The resulting query is executed on both command line and through the script and 
confirmed that it is working fine. 
    
    For Issue 2, I suspect that the root cause of the issue might be related to 
sending the parameters with '/'. But this theory could not be confirmed and 
modifying this did not work. Instead, the execSync approach did work fine. The 
same has been used. 
    
    **Testing**
    Two scenarios has been tested.
    
    1.  **log using the medic.js**
    This approach gets the logs for the last 27 minutes. It produces correct 
results as expected. 
    
    2.  **Execute log directly without dump option**
    In this scenario, it has to continuously display the logs repeatedly with 1 
second interval (until manually interrupted).It produces correct results as 
expected. 
    
    @dblotsky @riknoll @nikhilkh @rakatyal @alsorokin Can you please review and 
merge this PR?

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sarangan12/cordova-windows CB-10640

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-windows/pull/152.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #152
    
----
commit f54639b02cf226e4a96937935e6474c531fe502f
Author: Sarangan Rajamanickam <saraj...@microsoft.com>
Date:   2016-02-17T22:58:30Z

    CB-10640: Windows logging is broken
    
    Fixing the logging query

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to