Giter Club home page Giter Club logo

Comments (4)

dmuhamedagic avatar dmuhamedagic commented on August 15, 2024

All messages (or all severities) are going to stderr. That's
deliberately so.

Why would you want (or expect) INFO messages at stdout?

from crmsh.

tilmans avatar tilmans commented on August 15, 2024

Not all messages are error messages, some are informational. By pushing them all to stderr it becomes harder to differentiate error and non-error output. It also makes it harder to filter output since you can't redirect non-error output to somewhere else (/dev/null for example).

Is there a technical reason to put them all in stderr or is it just a matter of preference?

from crmsh.

dmuhamedagic avatar dmuhamedagic commented on August 15, 2024

There's no purely technical reason. I'd just expect all
messages to be sent to stderr, regardless of the severity. I'm
not aware of any convention about sending messages depending on
severity to stdout. I believe that all unix programs, at least
those I had a chance to work with, send messages to stderr, so
that they don't interfere with possible further processing in
pipes.

Otherwise, you should test for exit codes if you want to check
whether there was an error. The exit code is the ultimate result,
messages shouldn't be relied on for that.

Must say that I'm a bit confused. Could you give me an example
where this would affect your processes.

from crmsh.

tilmans avatar tilmans commented on August 15, 2024

Understood, thank you for your explanation. We will adjust our usage accordingly and rely on error codes only as we should.

from crmsh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.