Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-3395

How can I redirect sysout/syserr log message to file programmatically

    XMLWordPrintableJSON

Details

    • Question
    • Status: Resolved
    • Major
    • Resolution: Information Provided
    • 2.17.1
    • None
    • API, Core
    • None

    Description

      I have an Java application that execute on hadoop cluster and I need to capture all the log message to either file or console based on user's choice. I Am creating Console and RollingFileAppender programmatically as here and I was able to redirect my application logs to file or console as desired. But my cluster logs (sysout or syserr) are always going to console. How can i overwrite this default behavior? 

      Attachments

        Activity

          People

            Unassigned Unassigned
            vasuk Vasu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: