Accumulo
  1. Accumulo
  2. ACCUMULO-2372

Use POSIX logger for STDERR and STDOUT

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Component/s: None
    • Labels:

      Description

      Instead of piping STDOUT and STDERR to *.out and *.err files in our launch scripts, we should pipe to the POSIX cli logger (/usr/bin/logger) to log to the system logging facility at the desired log level.

      Incorporating the system logging facilities is useful for system administrators for troubleshooting and/or auditing. More integration with external logging facilities also means that we reduce our responsibility to maintain/manage the resulting logs to avoid problems (like filling up the local file system with logs), deferring that to utilities dedicated to that responsibility.

      The command-line options used for /usr/bin/logger should be enough to associate the logs with the particular process.

      (NOTE: Log4j can also be configured to use the system log facility, but that should be done through log4j configuration, with the appropriate log appender.)

        Activity

        Hide
        Christopher Tubbs added a comment -

        If we did that, the existing STDERR pipes wouldn't work, and all of our shell scripts would have to be re-done, anyway.

        Show
        Christopher Tubbs added a comment - If we did that, the existing STDERR pipes wouldn't work, and all of our shell scripts would have to be re-done, anyway.
        Hide
        Josh Elser added a comment -

        Presently, probably not? One day? Maybe?

        Show
        Josh Elser added a comment - Presently, probably not? One day? Maybe?
        Hide
        Mike Drob added a comment -

        I guess we have no hope of running Accumulo on Azure?

        Show
        Mike Drob added a comment - I guess we have no hope of running Accumulo on Azure?
        Hide
        Christopher Tubbs added a comment -

        That might be fair, but... /usr/bin/logger is POSIX. It's definitely there on Macs, and it's provided by the util-linux package on RPM-based systems.

        This is the same package that provides 'su', 'mount', and 'login'. It's also the same package that provides 'kill', which we have no problem assuming exists.

        So, if it's not there, I'd be very surprised as you'd probably be running some Linux-From-Scratch thing which is deliberately non-POSIX... and if that's the case, there's no telling how our scripts would behave on those systems... so, maybe it's not worth maintaining the ability to fall back to such fringe cases?

        Show
        Christopher Tubbs added a comment - That might be fair, but... /usr/bin/logger is POSIX. It's definitely there on Macs, and it's provided by the util-linux package on RPM-based systems. This is the same package that provides 'su', 'mount', and 'login'. It's also the same package that provides 'kill', which we have no problem assuming exists. So, if it's not there, I'd be very surprised as you'd probably be running some Linux-From-Scratch thing which is deliberately non-POSIX... and if that's the case, there's no telling how our scripts would behave on those systems... so, maybe it's not worth maintaining the ability to fall back to such fringe cases?
        Hide
        Mike Drob added a comment -

        We should also have a fall back option of using .out and .err files if /usr/bin/logger does not exist.

        Show
        Mike Drob added a comment - We should also have a fall back option of using .out and .err files if /usr/bin/logger does not exist.

          People

          • Assignee:
            Unassigned
            Reporter:
            Christopher Tubbs
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development