Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M14
    • Fix Version/s: 2.0.0-M15
    • Component/s: core
    • Labels:
      None
    • Environment:
      Linux

      Description

      Changing logging priortiy of root logger does not cause logging. Here is log4j.priorities

        Activity

        Hide
        Pierre-Arnaud Marcelot added a comment -

        Fixed at revision 1507063.

        http://svn.apache.org/r1507063

        Show
        Pierre-Arnaud Marcelot added a comment - Fixed at revision 1507063. http://svn.apache.org/r1507063
        Hide
        Pierre-Arnaud Marcelot added a comment -

        Jonathan,

        Could you try with this new 'log4j.properties' file?

        #############################################################################

        1. Licensed to the Apache Software Foundation (ASF) under one or more
        2. contributor license agreements. See the NOTICE file distributed with
        3. this work for additional information regarding copyright ownership.
        4. The ASF licenses this file to You under the Apache License, Version 2.0
        5. (the "License"); you may not use this file except in compliance with
        6. the License. You may obtain a copy of the License at
          #
        7. http://www.apache.org/licenses/LICENSE-2.0
          #
        8. Unless required by applicable law or agreed to in writing, software
        9. distributed under the License is distributed on an "AS IS" BASIS,
        10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        11. See the License for the specific language governing permissions and
        12. limitations under the License.
          #############################################################################
          log4j.rootCategory=WARN, F

        log4j.appender.F=org.apache.log4j.RollingFileAppender
        log4j.appender.F.File=$

        {apacheds.log.dir}

        /apacheds.log
        log4j.appender.F.MaxFileSize=100MB
        log4j.appender.F.MaxBackupIndex=3
        log4j.appender.F.layout=org.apache.log4j.PatternLayout
        log4j.appender.F.layout.ConversionPattern=[%d

        {HH:mm:ss}

        ] %p [%c] - %m%n

        1. Specific loggers (useful for debugging)
          #log4j.logger.jdbm.recman.BaseRecordManager=DEBUG
          #log4j.logger.org.apache.directory.server.OPERATION_LOG=DEBUG
          #log4j.logger.org.apache.directory.server.OPERATION_TIME=DEBUG
          #log4j.logger.org.apache.directory.api.CODEC_LOG=DEBUG
          #log4j.logger.org.apache.directory.server.ACI_LOG=DEBUG
          #log4j.logger.org.apache.directory.server.PROVIDER_LOG=DEBUG
          #log4j.logger.org.apache.directory.server.CONSUMER_LOG=DEBUG
          #log4j.logger.org.apache.directory.CURSOR_LOG=DEBUG
          #log4j.logger.org.apache.directory.api=DEBUG
          #log4j.logger.org.apache.directory.server=DEBUG
          #log4j.logger.net.sf.ehcache=DEBUG
          #log4j.logger.org.apache.mina=DEBUG

        I also wrote a documentation about logs which is currently awaiting validation on our staging website:
        http://directory.staging.apache.org/apacheds/advanced-ug/5.3-logs.html

        Is logging working properly with this?
        Any comment on the documentation is very welcomed.
        Thanks!

        Show
        Pierre-Arnaud Marcelot added a comment - Jonathan, Could you try with this new 'log4j.properties' file? ############################################################################# Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ############################################################################# log4j.rootCategory=WARN, F log4j.appender.F=org.apache.log4j.RollingFileAppender log4j.appender.F.File=$ {apacheds.log.dir} /apacheds.log log4j.appender.F.MaxFileSize=100MB log4j.appender.F.MaxBackupIndex=3 log4j.appender.F.layout=org.apache.log4j.PatternLayout log4j.appender.F.layout.ConversionPattern=[%d {HH:mm:ss} ] %p [%c] - %m%n Specific loggers (useful for debugging) #log4j.logger.jdbm.recman.BaseRecordManager=DEBUG #log4j.logger.org.apache.directory.server.OPERATION_LOG=DEBUG #log4j.logger.org.apache.directory.server.OPERATION_TIME=DEBUG #log4j.logger.org.apache.directory.api.CODEC_LOG=DEBUG #log4j.logger.org.apache.directory.server.ACI_LOG=DEBUG #log4j.logger.org.apache.directory.server.PROVIDER_LOG=DEBUG #log4j.logger.org.apache.directory.server.CONSUMER_LOG=DEBUG #log4j.logger.org.apache.directory.CURSOR_LOG=DEBUG #log4j.logger.org.apache.directory.api=DEBUG #log4j.logger.org.apache.directory.server=DEBUG #log4j.logger.net.sf.ehcache=DEBUG #log4j.logger.org.apache.mina=DEBUG I also wrote a documentation about logs which is currently awaiting validation on our staging website: http://directory.staging.apache.org/apacheds/advanced-ug/5.3-logs.html Is logging working properly with this? Any comment on the documentation is very welcomed. Thanks!
        Hide
        Pierre-Arnaud Marcelot added a comment -

        Hi Jonathan,

        I checked most of the ApacheDS installers (Binary, Debian, OS X, Archive zip and tar.gz) and logging works for all them.

        Now, changing the root logger level is not enough to have logs showing, you also need to change the log level on the particular logs you're interested in and we have more than 10 different depending on which part of the server you'd like to log (LDAP protocol, database, ACI, etc.).
        Those are located at the end of the log4j.properties file:

        log4j.logger.jdbm.recman.BaseRecordManager=FATAL
        log4j.logger.org.apache.directory.server.OPERATIONS_LOG=FATAL
        log4j.logger.org.apache.directory.server.OPERATION_TIME=FATAL
        log4j.logger.org.apache.directory.api.CODEC_LOG=FATAL
        log4j.logger.org.apache.directory.server.ACI_LOG=FATAL
        log4j.logger.org.apache.directory.server.PROVIDER_LOG=FATAL
        log4j.logger.org.apache.directory.server.CONSUMER_LOG=FATAL
        log4j.logger.org.apache.directory.CURSOR_LOG=FATAL
        log4j.logger.org.apache.directory.api=FATAL
        log4j.logger.org.apache.directory.server=DEBUG
        log4j.logger.net.sf.ehcache=FATAL
        log4j.logger.org.apache.mina=FATAL

        I'll create/update a page in the ApacheDS documentation to make it easier to understand and have a real reference on how to enable logging for ApacheDS.

        Show
        Pierre-Arnaud Marcelot added a comment - Hi Jonathan, I checked most of the ApacheDS installers (Binary, Debian, OS X, Archive zip and tar.gz) and logging works for all them. Now, changing the root logger level is not enough to have logs showing, you also need to change the log level on the particular logs you're interested in and we have more than 10 different depending on which part of the server you'd like to log (LDAP protocol, database, ACI, etc.). Those are located at the end of the log4j.properties file: log4j.logger.jdbm.recman.BaseRecordManager=FATAL log4j.logger.org.apache.directory.server.OPERATIONS_LOG=FATAL log4j.logger.org.apache.directory.server.OPERATION_TIME=FATAL log4j.logger.org.apache.directory.api.CODEC_LOG=FATAL log4j.logger.org.apache.directory.server.ACI_LOG=FATAL log4j.logger.org.apache.directory.server.PROVIDER_LOG=FATAL log4j.logger.org.apache.directory.server.CONSUMER_LOG=FATAL log4j.logger.org.apache.directory.CURSOR_LOG=FATAL log4j.logger.org.apache.directory.api=FATAL log4j.logger.org.apache.directory.server=DEBUG log4j.logger.net.sf.ehcache=FATAL log4j.logger.org.apache.mina=FATAL I'll create/update a page in the ApacheDS documentation to make it easier to understand and have a real reference on how to enable logging for ApacheDS.

          People

          • Assignee:
            Pierre-Arnaud Marcelot
            Reporter:
            Jonathan Rosenberg
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development