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

zt-exec converting multi-line output to single line #59

Open
muhammad-asad-confiz opened this issue May 23, 2018 · 3 comments
Open

zt-exec converting multi-line output to single line #59

muhammad-asad-confiz opened this issue May 23, 2018 · 3 comments

Comments

@muhammad-asad-confiz
Copy link

Hi,

I am facing a problem that is my output, which is being redirected to logger is quite large and it's multi-line but zt-exec converts that multi-line to a single line. Due to this reason my business logic is failing. Is there a way in zt-exec to maintain the new lines and carriage returns.

@toomasr
Copy link
Collaborator

toomasr commented May 23, 2018

Do you mind providing an example for this?

@toomasr
Copy link
Collaborator

toomasr commented May 24, 2018

I deleted your comment as it might have had some personal information that you might not have wanted to share. As for an example I meant code not the output. Some code the reproduces the issue you are seeing.

@1DanielC
Copy link

I'm experiencing this same issue. My stderr from a python script i'm running looks like:

Traceback (most recent call last):
  File "somethingSomething"
AssertionError

and, when running :

ProcessExecutor()
      .command(cmd)
      .readOutput(true)
      .redirectError(Slf4jStream.of(LOG).asError())
      .execute()

it is translated to

2021-08-11 19:01:58.336 ERROR [      Thread-19] o.package.CommandRunner: Traceback (most recent call last):
2021-08-11 19:01:58.337 ERROR [      Thread-19] o.package.CommandRunner:     File "somethingSomething"
2021-08-11 19:01:58.338 ERROR [      Thread-19] o.package.CommandRunner: AssertionError

Ideally, the errorStream would be able to output this entire trace as one log message, which seems to be very difficult to do with how it's currently designed. It parses carriage returns and newlines before adding it to the logger, which isnt ideal.

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