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

Native execution doesn't print all output #1621

Closed
mahesh-panchal opened this issue Jun 3, 2020 · 3 comments
Closed

Native execution doesn't print all output #1621

mahesh-panchal opened this issue Jun 3, 2020 · 3 comments
Milestone

Comments

@mahesh-panchal
Copy link
Contributor

Bug report

Native execution does not appear to print all output.

Expected behavior and actual behavior

The example given in the documentation for native execution when run does not print the complete output.

Steps to reproduce the problem

test_exec.nf:

x = Channel.from( 'a', 'b', 'c')

process simpleSum {
    input:
    val x

    exec:
    println "Hello Mr. $x"
}

Program output

$ nextflow run test_exec.nf 
N E X T F L O W  ~  version 20.01.0
Launching `test_exec.nf` [determined_perlman] - revision: 2dd250e302
Hello Mr. b
[-        ] process > simpleSum -
Hello Mr. a
executor >  local (3)
[66/1f8820] process > simpleSum [100%] 3 of 3 ✔

$ nextflow run test_exec.nf 
N E X T F L O W  ~  version 20.01.0
Launching `test_exec.nf` [cheesy_marconi] - revision: 2dd250e302
[-        ] process > simpleSum -
Hello Mr. c
Hello Mr. b
executor >  local (3)
[88/631d95] process > simpleSum [100%] 3 of 3 ✔

nextflow.log

Environment

  • Nextflow version: 20.01.0
  • Java version: openjdk 11.0.1 2018-10-16 LTS
  • Operating system: macOS
  • Bash version: GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
@pditommaso
Copy link
Member

This is a side effect of the ansi logging rendering. Either disable it or use log.info that support it., e.g.

process simpleSum {
    input:
    val x

    exec:
    log.info "Hello Mr. $x"
}

@dennishendriksen
Copy link

@pditommaso I'm new to Nextflow and it took me quite some time to figure out how to log information for debugging purposes while tinkering on my first scripts (up to the point that I almost gave up on Nextflow). Using log.info instead of println solved the issue. I think updating the documentation would be valuable for new users like me.

@pditommaso
Copy link
Member

Thanks for pointing this out again. I found a solution to this problem. I'll include it in the next release.

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