Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Done
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      Hi,
      I configured my own logger log4j.properties file which is inside my bundle and in this configuration, I specied that all my bundle specific logging should go to MY_LOG.log and this log4j.properties file resides in src/main/resources folder.

            1. My Logger

      ###########################
      log4j.appender.com.client=debug
      log4j.rootLogger=DEBUG, MYLOG

      log4j.logger.org.apache.camel=DEBUG

      1. Pattern to output the caller's file name and line number.
        log4j.appender.MYLOG.layout=org.apache.log4j.PatternLayout
        log4j.appender.MYLOG.layout.ConversionPattern =%d {ABSOLUTE} %5p %c{1}:%L - %m%n
        log4j.appender.MYLOG = org.apache.log4j.DailyRollingFileAppender
        log4j.appender.MYLOG.File = MY_LOG.log
        log4j.appender.MYLOG.DatePattern='.'yyyy-MM-dd


        When I deployed my code in to FUSE ESB(apache servicemix), all my logging data is going into
        /apache_servicemix/data/log/karaf.log file and I don't find MY_LOG.log anywhere.

        and I see that /apache-servicemix/deploy folder has log4j.properties file which has the following content
        -----------------

        log4j.appender.stdout=org.apache.log4j.ConsoleAppender
        log4j.appender.stdout.Target=System.out
        log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
        log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE}

        %5p %c

        {1}

        :%L - %m%n
        log4j.rootLogger=DEBUG, stdout
        ~
        ~

      Looks like FUSE ESB is not considering my logger.

      I am wondering how we can specify to consider my logger rather than the default logger.

      Thanks.

        Gliffy Diagrams

          Activity

          Hide
          usha kanteti added a comment -

          I realized that FUSE ESB's default logging comes from etc/org.ops4j.pax.logging.cfg configuration file.

          If I configure etc/org.ops4j.pax.logging.cfg file, then that configuration applies to all the bundles deployed in that container.

          Ideally I would like to specify different logging configuration for my bundle which should be different from other bundles.

          Show
          usha kanteti added a comment - I realized that FUSE ESB's default logging comes from etc/org.ops4j.pax.logging.cfg configuration file. If I configure etc/org.ops4j.pax.logging.cfg file, then that configuration applies to all the bundles deployed in that container. Ideally I would like to specify different logging configuration for my bundle which should be different from other bundles.
          Hide
          Sean O'Callaghan added a comment -

          Hi,

          Jansi is a small java library that allows you to use ANSI escape sequences in your Java console applications. It implements ANSI support on platforms which don't support it like Windows and provides graceful degradation for when output is being sent to output devices which cannot support ANSI sequences.

          Please do not raise issues with respect to FUSE products under this project, it is not monitored by FUSE support.

          Details on how to raise a support request are available here: http://fusesource.com/wiki/display/CUSTINFO/Jira+Instructions

          With respect to logging, this cannot be set on a per bundle basis, the logging mechanism is underpinned by log4j so you can set logging on a per class basis.

          I am now going to close this issue.

          If you have any further queries please open a support request as per the instructions above.

          Regards,

          Seán O'Callaghan

          Show
          Sean O'Callaghan added a comment - Hi, Jansi is a small java library that allows you to use ANSI escape sequences in your Java console applications. It implements ANSI support on platforms which don't support it like Windows and provides graceful degradation for when output is being sent to output devices which cannot support ANSI sequences. Please do not raise issues with respect to FUSE products under this project, it is not monitored by FUSE support. Details on how to raise a support request are available here: http://fusesource.com/wiki/display/CUSTINFO/Jira+Instructions With respect to logging, this cannot be set on a per bundle basis, the logging mechanism is underpinned by log4j so you can set logging on a per class basis. I am now going to close this issue. If you have any further queries please open a support request as per the instructions above. Regards, Seán O'Callaghan

            People

            • Assignee:
              Sean O'Callaghan
              Reporter:
              usha kanteti
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development