You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Thorsten Schöning (Jira)" <lo...@logging.apache.org> on 2020/08/07 17:46:00 UTC

[jira] [Resolved] (LOGCXX-294) NTEventLogAppender - would be nice to point event log at DLL other than log4cxx.dll

     [ https://issues.apache.org/jira/browse/LOGCXX-294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thorsten Schöning resolved LOGCXX-294.
--------------------------------------
    Resolution: Won't Fix

Because we are trying to reduce the backlog of open issues, I'm closing this one right now. The project lacks developers and tries to reduce the variances in the build, supported platforms etc. While this feature suggestion reads somewhat interesting, nobody seems to have asked for it anymore since then.

> NTEventLogAppender - would be nice to point event log at DLL other than log4cxx.dll
> -----------------------------------------------------------------------------------
>
>                 Key: LOGCXX-294
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-294
>             Project: Log4cxx
>          Issue Type: Improvement
>          Components: Appender
>    Affects Versions: 0.10.0, 0.11.0
>         Environment: Windows
>            Reporter: Mark Bartosik
>            Assignee: Curt Arnold
>            Priority: Minor
>
> The problem is really one of allowing log4cxx to be statically linked to none .exe projects. If I have a myproject.dll into which I statically link log4cxx then I must have the message compiler entries in either log4cxx.dll or myexe.exe, this is not always desirable. I know that static linking is not really supported, but I suspect that this one of the only things in the way.
> So it would be helpful to have a property / option called ModulePath which would override the use of GetModuleHandleW in nteventlogappender.cpp this would make static linking of the log4cxx code much easier.
> Actually it is possible to detect the path of the module into which the code is linked, but it requires a little extra know-how, this MIGHT be a better alternative to the .exe, but would break some existing code. FYI to detect the module of the calling code call GetOurModule below:
> However, a property / option ModulePath would be great.
> HMODULE GetModuleFromAddress(const void * address)
> {
>    MEMORY_BASIC_INFORMATION mbi;
>    if (VirtualQuery(address, &mbi, sizeof(mbi)) != sizeof(mbi))
>    {
>       return 0;
>    }
>       return reinterpret_cast<HMODULE>(mbi.AllocationBase);
> }
> inline HMODULE GetOurModule()
> {
>    return GetModuleFromAddress(reinterpret_cast<const void *>(GetOurModule));
> }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)