Log4cxx
  1. Log4cxx
  2. LOGCXX-67

NTEventLogAppender always uses RPC method for logging and has inadequate error handling.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.7, 0.10.0
    • Fix Version/s: 0.10.0
    • Component/s: Appender
    • Labels:
      None
    • Environment:
      Windows NT

      Description

      ::RegisterEventSource uses the RPC method for logging events to an event log if a server name is passed in, even if localhost. In order to use the local API, you must pass NULL into the method for the server name.

      Also, NTEventLogAppender logs no useful messages if an error occured somewhere in the Windows API.

        Activity

        Curt Arnold made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 0.10.0 [ 10782 ]
        Resolution Fixed [ 1 ]
        Hide
        Curt Arnold added a comment -

        log4cxx.dll now includes the message resource needed to properly format event log messages.

        Show
        Curt Arnold added a comment - log4cxx.dll now includes the message resource needed to properly format event log messages.
        Daniel Einspanjer made changes -
        Field Original Value New Value
        Attachment log4cxx_0_9_7.nteventappender.patch [ 19092 ]
        Hide
        Daniel Einspanjer added a comment -

        Special cases empty string for server name to pass NULL into the ::RegisterEventSource call so the local API is used instead of RPC.

        Adds a helper method to get an error message from Windows API and uses this method to report errors during init and usage of NTEventLogAppender

        Show
        Daniel Einspanjer added a comment - Special cases empty string for server name to pass NULL into the ::RegisterEventSource call so the local API is used instead of RPC. Adds a helper method to get an error message from Windows API and uses this method to report errors during init and usage of NTEventLogAppender
        Daniel Einspanjer created issue -

          People

          • Assignee:
            Curt Arnold
            Reporter:
            Daniel Einspanjer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development