[ https://issues.apache.org/jira/browse/CB-8936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14533802#comment-14533802 ]
ASF GitHub Bot commented on CB-8936: ------------------------------------ Github user dblotsky commented on a diff in the pull request: https://github.com/apache/cordova-medic/pull/53#discussion_r29915107 --- Diff: medic/medic-log.js --- @@ -0,0 +1,60 @@ +#!/usr/bin/env node + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* jshint node: true */ + +"use strict"; + +var fs = require("fs"); + +var shelljs = require("shelljs"); +var optimist = require("optimist"); +var util = require("../lib/util"); + +// main +function main() { + + // shell config + shelljs.config.fatal = false; + shelljs.config.silent = false; + + // command-specific args + var argv = optimist + .usage("Usage: $0 {platform}") + .argv; + + switch (argv.platform) { + case util.ANDROID: + var cmd = "adb logcat -d"; + console.log("executing " + cmd); + shelljs.exec(cmd, function(code, output) { + if (code > 0) { + fatal('Failed to run logcat command.'); --- End diff -- I was about to merge and did a test, and caught a small bug. It's now `util.fatal`. > Surface platform-specific logs in buildbot > ------------------------------------------ > > Key: CB-8936 > URL: https://issues.apache.org/jira/browse/CB-8936 > Project: Apache Cordova > Issue Type: Task > Components: Medic > Reporter: Alexander Sorokin > > Platform specific logs (e.g. logcat for android, stderr.log and stdin.log for > iOS etc.) should be gathered and displayed in buildbot. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org