Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 892865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:07:44+00:00 2026-05-15T14:07:44+00:00

I have several question: If there is an error which has to be displayed

  • 0

I have several question:

  1. If there is an error which has to be displayed to the client – It is a good thing to use STDERR stream instead of STDOUT? Or is it a trivial issue?

  2. I want to add color support to output messages of this utility. Do I have to use some environment-tolerant framework for that?(it can be 256 color mode and “pure” one). Or how to make it tolerant?

  3. I’m afraid to add colors to the output because clients may redirect output to log file. Can it potentially “break” anything because of that?

Please help me to build this utility in UNIX-way(Do one thing and do it well).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T14:07:45+00:00Added an answer on May 15, 2026 at 2:07 pm

    STDERR is better than STDOUT for errors for a couple of reasons. Redirecting the output won’t hide the errors from you. You can prevent warnings from mixing with the output which makes it easier to parse/process in some cases.

    You may want to look into the curses library which should support the ANSI color sets.

    Utilities like ls will detect if their output is being redirected and drop the color codes so that log files, etc. don’t get horked up. You should do the same.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There have been several questions already posted with specific questions about dependency injection ,
There have been several questions recently about database indexing and clustered indexing and it
An easy jQuery question. I have several identical forms ( except their name )
I think the question says it all. I have several monthly processes in stored
We have several jobs that run concurrently that have to use the same config
I have a Struts (1.3x) ActionForm that has several String and boolean properties/fields, but
I have a model called Answer which has a ForeignKey relationship to another model
I apologise for this question as it is rather fuzzy and there are several
I have several classes in my application, all of which have a Name property
I have several Models: Workspace User Asset WorkspaceUser WorkspaceAsset Workspace has many users and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.