Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to see the output log/err of the shell script #3

Open
yyfearth opened this issue Jul 11, 2016 · 6 comments
Open

How to see the output log/err of the shell script #3

yyfearth opened this issue Jul 11, 2016 · 6 comments

Comments

@yyfearth
Copy link

all echo in the shell script has nothing showing up from the karma logs.

@jeanbza
Copy link

jeanbza commented Nov 21, 2016

ping @zzo

@jeanbza
Copy link

jeanbza commented Nov 21, 2016

@yyfearth I think that this piece of code means that it's karma that prevents you from seeing launcher output

@jeanbza
Copy link

jeanbza commented Nov 21, 2016

Replacing that line of code in your node_modules with the following works

  var spawnWithOutput = function () {
      var proc = spawn.apply(null, arguments)
      log.info("hello world")
      proc.stdout.pipe(process.stdout)
      proc.stderr.pipe(process.stderr)

      return proc
    }

    ProcessLauncher.call(launcher, spawnWithOutput, require('../temp_dir'), timer)

@yyfearth
Copy link
Author

yyfearth commented Nov 21, 2016

@jadekler thanks very much.

I think it should be nice to make it configurable.

@zzo
Copy link
Contributor

zzo commented Nov 22, 2016

in what way - whether to have this functionality or not or send it to a file or ?
thanks!

@yyfearth
Copy link
Author

I think a better way is redirect them into a logger, so the output can be tagged and filtered.
e.g.:

[script] .........
[script] .........

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants