Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.10.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Debian GNU/Linux 3,1

      Description

      The logging methods for localized logging and the corresponding test case are stubbed out.

        Activity

        Andreas Fester created issue -
        Andreas Fester made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Curt Arnold added a comment -

        Made additional changes in r 385709 and 385712.

        Property files in Java are explicitly assumed to be in ISO-8859-1 encoding regardless of the default encoding of the system. Added CharsetDecodier::getISOLatinEncoder and used that in the creation of the FileInputReader's used to read the property files.

        File::write was only used in a unit test and so removed it instead of only deprecating it.

        Added ByteArrayInputStream in anticipation of writing more unit tests around Reader.

        Changed FileInputStream::fileptr from void* to apr_file_t*. log4cxx/file.h already declared apr_file_t.

        Changed FileInputStream::read to use ByteBuffer& instead of char* and length. This simplifies the decoding process by eliminating the need to swap things in and out of ByteBuffer's. CharsetDecoder was designed to work best with nio and the change makes this method similar to java.nio.channels.ReadableByteChannel.read.

        Replaced calls to apr_file_open() in FileInputStream with File.open(). APR can require platform specific tweaking of filespecs and I'd like to keep that all centralized in File.open.

        Replaced a lot of transcoder calls in logger.cpp with equivalent transcoder macros.

        Show
        Curt Arnold added a comment - Made additional changes in r 385709 and 385712. Property files in Java are explicitly assumed to be in ISO-8859-1 encoding regardless of the default encoding of the system. Added CharsetDecodier::getISOLatinEncoder and used that in the creation of the FileInputReader's used to read the property files. File::write was only used in a unit test and so removed it instead of only deprecating it. Added ByteArrayInputStream in anticipation of writing more unit tests around Reader. Changed FileInputStream::fileptr from void* to apr_file_t*. log4cxx/file.h already declared apr_file_t. Changed FileInputStream::read to use ByteBuffer& instead of char* and length. This simplifies the decoding process by eliminating the need to swap things in and out of ByteBuffer's. CharsetDecoder was designed to work best with nio and the change makes this method similar to java.nio.channels.ReadableByteChannel.read. Replaced calls to apr_file_open() in FileInputStream with File.open(). APR can require platform specific tweaking of filespecs and I'd like to keep that all centralized in File.open. Replaced a lot of transcoder calls in logger.cpp with equivalent transcoder macros.
        Hide
        Curt Arnold added a comment -

        A few random comments:

        I've been working on some external formatting utility classes for log4j that I think expose a better API for formatted logging than the l7d or the SLF4J API's. I haven't added explicit support for resource bundles to that, but it should be fairly straight-forward. Can be checked out from http://svn.apache.org/repos/logging/sandbox/log4j/formatter.

        I'm not sure if the current Loader::getResourceAsStream mimics either Java resource bundles or platform specific resource mechanisms. Looks like it just looks for files in the current working directory which would not seem to be helpful on any platform.

        Show
        Curt Arnold added a comment - A few random comments: I've been working on some external formatting utility classes for log4j that I think expose a better API for formatted logging than the l7d or the SLF4J API's. I haven't added explicit support for resource bundles to that, but it should be fairly straight-forward. Can be checked out from http://svn.apache.org/repos/logging/sandbox/log4j/formatter . I'm not sure if the current Loader::getResourceAsStream mimics either Java resource bundles or platform specific resource mechanisms. Looks like it just looks for files in the current working directory which would not seem to be helpful on any platform.
        Hide
        Andreas Fester added a comment -

        I resolve this bug report because its original issue is fixed. If there are additional or new issues and/or wishes (e.g. with Loader::getResourceAsStream()), please create a new bug report.

        Show
        Andreas Fester added a comment - I resolve this bug report because its original issue is fixed. If there are additional or new issues and/or wishes (e.g. with Loader::getResourceAsStream()), please create a new bug report.
        Andreas Fester made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Andreas Fester
            Reporter:
            Andreas Fester
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development