Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-600

Error messages should be displayed on stderr, other messages on stdout

    Details

    • Type: Improvement
    • Status: Done
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0, 2.4.6
    • Fix Version/s: 4.0.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Unix

      Description

      When scripting OpenDJ commands it is almost impossible to catch error message text as everything is either all displayed on stderr or all displayed on stdout and apart from ldapsearch most commands return 0 on success or 1 on error.

      It would be good if errors where sent to stderr and information messages to stdout. i.e.

      1. /opt/opendj/bin/backup -p 4444 -h host.test.com -D "cn=Directory Manager" -w password -a -d /opt/opendj/bak --recurringTask "00 0-23/2 * * *"

      ---- following should be sent to stderr ---->
      An error occurred while parsing the command-line arguments: The provided
      schedule value has an invalid format. The schedule must be expressed using a
      crontab(5) format. Error details: The provided recurring task schedule value
      has an invalid hour token

      ---- following is just the usage so should be sent to stdout ---->
      This utility can be used to back up one or more Directory Server backends

      Usage: backup

      {options}
      where {options}

      include:

      -n, --backendID

      {backendName}

      Backend ID for the backend to archive ...... rest of usage follows !!!!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                matthew Matthew Swift
                Reporter:
                ukflyer ukflyer
                Dev Assignee:
                Matthew Swift
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: