[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user alsorokin commented on the pull request: https://github.com/apache/cordova-windows/pull/152#issuecomment-188131082 @dblotsky ouch. That's clearly a bug. It shouldn't do that. --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user dblotsky commented on the pull request: https://github.com/apache/cordova-windows/pull/152#issuecomment-187914846 @alsorokin those other commands print only new messages continuously. The Windows script prints existing messages over and over again, which is a different behavior. We should either make it behave the same, or put the looping behavior behind a flag. --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user alsorokin commented on the pull request: https://github.com/apache/cordova-windows/pull/152#issuecomment-187893159 @dblotsky when I was writing this code, I made continuous logging the default behavior because the log script for Android platform is continuously printing the logcat output. The ios log command tries to output the log file by using `tail -f` command which should print file contents continuously too. I think that for the sake of consistency cordova-windows should behave like the other platforms do. --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user dblotsky commented on the pull request: https://github.com/apache/cordova-windows/pull/152#issuecomment-187364348 @alsorokin that makes sense. Do you think flipping the behavior would be better? That is, to behave as if `--dump` was passed by default, and loop only if a flag (like `--loop`) was passed? --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user alsorokin commented on the pull request: https://github.com/apache/cordova-windows/pull/152#issuecomment-186592682 The purpose of this code is to remember initial state of the channels to return them back to this state after the script is completed. If we remove this code, we would leave them open after the script execution. We can enable/disable the channels only if we have administrative privileges, so the use case of this would be the user monitoring the log output of his program and not our medic script monitoring mobilespec app for the issues. I think it is worth it to leave this code here because ideally we would want to leave the user's environment in the same state as it was before our script execution. --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user sarangan12 commented on the pull request: https://github.com/apache/cordova-windows/pull/152#issuecomment-186449043 +1 to remove the lines. @alsorokin your thoughts? --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user dblotsky commented on the pull request: https://github.com/apache/cordova-windows/pull/152#issuecomment-186445524 @alsorokin: is there a reason that the code under [this line][line] is even necessary? [line]: https://github.com/apache/cordova-windows/blob/master/template/cordova/lib/log.js#L68 --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user dblotsky commented on the pull request: https://github.com/apache/cordova-windows/pull/152#issuecomment-186444637 @alsorokin yep, I ran those and now it works. LGTM. --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user asfgit closed the pull request at: https://github.com/apache/cordova-windows/pull/152 --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user alsorokin commented on the pull request: https://github.com/apache/cordova-windows/pull/152#issuecomment-186125182 @dblotsky as far as I remember, this script can run without administrator privileges, but you'll need to enable the needed channels first: `wevtutil set-log "Microsoft-Windows-AppHost/Admin" /e:true /rt:true /ms:4194304` `wevtutil set-log "Microsoft-Windows-AppHost/ApplicationTracing" /e:true /rt:true /ms:4194304` https://github.com/apache/cordova-medic/blob/master/SLAVES.md#windows-8-and-windows-81 --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user dblotsky commented on the pull request: https://github.com/apache/cordova-windows/pull/152#issuecomment-186026434 1. Why does running the script manually print repeatedly? Is that a use case? 2. What is the 2-second delay for? It doesn't wait on Ctrl-C if the script was run from Bash. 3. Running this using medic silently fails for me: `../cordova-medic/medic/medic.js log --platform windows`. 4. The `Dumping logs starting from 90` message is not very informative. Is there a way to print a more human-readable timeframe? 5. Are there any tests for this? Specifically, it would be good to verify that the timeouts passed around are correct. --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user dblotsky commented on the pull request: https://github.com/apache/cordova-windows/pull/152#issuecomment-186026681 I just realized that a lot of my above comments apply to the logging script in general, not to this specific fix. This fix seems to work, so it LGTM. Only one question there: it doesn't work unless I run it with Administrator privileges first; is this expected? --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
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 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user dblotsky commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/151#discussion_r53257649 --- Diff: template/cordova/lib/log.js --- @@ -151,23 +154,23 @@ function exitGracefully(exitCode) { } function startLogging(channel) { -var startTime = new Date().toISOString(); +var logFromTime = 10 * ONE_MINUTE; --- End diff -- This is set to the default value twice, [here][case1] and [there][case2], how come? [case1]: https://github.com/apache/cordova-windows/pull/151/files#diff-378bd5207000848de6b771d61b037e2fR157 [case2]: https://github.com/apache/cordova-windows/pull/151/files#diff-378bd5207000848de6b771d61b037e2fR53 --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user sarangan12 closed the pull request at: https://github.com/apache/cordova-windows/pull/151 --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user sarangan12 commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/151#discussion_r53250824 --- Diff: template/cordova/lib/log.js --- @@ -47,10 +47,10 @@ var appTracingInitialState = null, * and prints them to console */ module.exports.run = function(args) { -var startTime = new Date(new Date().getTime() - 10 * 60 * 1000).toISOString(), // show last 10 minutes by default -knownOpts = { 'minutes' : Number, 'dump' : Boolean, 'help' : Boolean }, -shortHands = { 'mins' : ['--minutes'], 'h' : ['--help'] }, -parsedOpts = nopt(knownOpts, shortHands, args, 0); +var logFromTime = 10 * 60 * 1000; // show last 10 minutes by default --- End diff -- @dblotsky Done --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user dblotsky commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/151#discussion_r53248411 --- Diff: template/cordova/lib/log.js --- @@ -47,10 +47,10 @@ var appTracingInitialState = null, * and prints them to console */ module.exports.run = function(args) { -var startTime = new Date(new Date().getTime() - 10 * 60 * 1000).toISOString(), // show last 10 minutes by default -knownOpts = { 'minutes' : Number, 'dump' : Boolean, 'help' : Boolean }, -shortHands = { 'mins' : ['--minutes'], 'h' : ['--help'] }, -parsedOpts = nopt(knownOpts, shortHands, args, 0); +var logFromTime = 10 * 60 * 1000; // show last 10 minutes by default --- End diff -- Might be useful to define `ONE_MINUTE` and then just say `10 * ONE_MINUTE` or `parsedOpts.minutes * ONE_MINUTE`, in order to avoid duplication of `60 * 1000`. --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user nikhilkh commented on the pull request: https://github.com/apache/cordova-windows/pull/151#issuecomment-185453467 + @alsorokin to review --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user sarangan12 commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/151#discussion_r53247772 --- Diff: template/cordova/lib/log.js --- @@ -47,10 +47,10 @@ var appTracingInitialState = null, * and prints them to console */ module.exports.run = function(args) { -var startTime = new Date(new Date().getTime() - 10 * 60 * 1000).toISOString(), // show last 10 minutes by default -knownOpts = { 'minutes' : Number, 'dump' : Boolean, 'help' : Boolean }, -shortHands = { 'mins' : ['--minutes'], 'h' : ['--help'] }, -parsedOpts = nopt(knownOpts, shortHands, args, 0); +var startTime = 10 * 60 * 1000; // show last 10 minutes by default --- End diff -- @riknoll Done --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
Github user riknoll commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/151#discussion_r53247225 --- Diff: template/cordova/lib/log.js --- @@ -47,10 +47,10 @@ var appTracingInitialState = null, * and prints them to console */ module.exports.run = function(args) { -var startTime = new Date(new Date().getTime() - 10 * 60 * 1000).toISOString(), // show last 10 minutes by default -knownOpts = { 'minutes' : Number, 'dump' : Boolean, 'help' : Boolean }, -shortHands = { 'mins' : ['--minutes'], 'h' : ['--help'] }, -parsedOpts = nopt(knownOpts, shortHands, args, 0); +var startTime = 10 * 60 * 1000; // show last 10 minutes by default --- End diff -- Nitpick: It would be nice to rename startTime to something else. It isn't really a start time anymore. --- 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
[GitHub] cordova-windows pull request: CB-10640: Windows logging is broken
GitHub user sarangan12 opened a pull request: https://github.com/apache/cordova-windows/pull/151 CB-10640: Windows logging is broken CB-10640: Windows logging is broken @dblotsky @riknoll @rakatyal @nikhilkh 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/151.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 #151 commit b4392c676c485ba96222b1edb3b4c5853c8eebf3 Author: Sarangan Rajamanickam Date: 2016-02-17T22:58:30Z CB-10640: Windows logging is broken CB-10640: Windows logging is broken --- 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