Ervin Bajramovic | 17 Jun 2013 16:36
Favicon

faild to compile apr-util for log4cxx on Windows with Mingw

Hi all

 

Im trying to build log4cxx on Windows XP and Windows 7 with Mingw. I could build apr 1.4.6  successfully but apr-util 1.5.2 faills on Windows XP an Windows 7 with the same error message:

 

 

$ make

Making all in xml/expat

make[1]: Entering directory `/src/apr-util/xml/expat'

/bin/sh ./libtool --silent --mode=compile gcc -g -O2 -DHAVE_EXPAT_CONFIG_H   -I.

/lib -I. -o lib/xmlparse.lo -c lib/xmlparse.c

/bin/sh ./libtool --silent --mode=compile gcc -g -O2 -DHAVE_EXPAT_CONFIG_H   -I.

/lib -I. -o lib/xmltok.lo -c lib/xmltok.c

/bin/sh ./libtool --silent --mode=compile gcc -g -O2 -DHAVE_EXPAT_CONFIG_H   -I.

/lib -I. -o lib/xmlrole.lo -c lib/xmlrole.c

/bin/sh ./libtool --silent --mode=link gcc -g -O2 -DHAVE_EXPAT_CONFIG_H   -I./li

b -I. -no-undefined -version-info 5:0:5 -rpath /usr/local/apr/lib  -o libexpat.l

a lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo

make[1]: Leaving directory `/src/apr-util/xml/expat'

make[1]: Entering directory `/src/apr-util'

/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHA

VE_CONFIG_H -DWIN32 -D__MSVCRT__ -D_LARGEFILE64_SOURCE   -I/src/apr-util/include

-I/src/apr-util/include/private  -I/usr/local/apr/include/apr-1  -I/src/apr-uti

l/xml/expat/lib  -o buckets/apr_brigade.lo -c buckets/apr_brigade.c && touch buc

kets/apr_brigade.lo

/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHA

VE_CONFIG_H -DWIN32 -D__MSVCRT__ -D_LARGEFILE64_SOURCE   -I/src/apr-util/include

-I/src/apr-util/include/private  -I/usr/local/apr/include/apr-1  -I/src/apr-uti

l/xml/expat/lib  -o buckets/apr_buckets.lo -c buckets/apr_buckets.c && touch buc

kets/apr_buckets.lo

/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHA

VE_CONFIG_H -DWIN32 -D__MSVCRT__ -D_LARGEFILE64_SOURCE   -I/src/apr-util/include

-I/src/apr-util/include/private  -I/usr/local/apr/include/apr-1  -I/src/apr-uti

l/xml/expat/lib  -o buckets/apr_buckets_alloc.lo -c buckets/apr_buckets_alloc.c

&& touch buckets/apr_buckets_alloc.lo

/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHA

VE_CONFIG_H -DWIN32 -D__MSVCRT__ -D_LARGEFILE64_SOURCE   -I/src/apr-util/include

-I/src/apr-util/include/private  -I/usr/local/apr/include/apr-1  -I/src/apr-uti

l/xml/expat/lib  -o buckets/apr_buckets_eos.lo -c buckets/apr_buckets_eos.c && t

ouch buckets/apr_buckets_eos.lo

buckets/apr_buckets_eos.c:47:42: error: variable 'apr_bucket_type_eos' definitio

n is marked dllimport

buckets/apr_buckets_eos.c:47:42: warning: 'apr_bucket_type_eos' redeclared witho

ut dllimport attribute after being referenced with dll linkage [enabled by defau

lt]

make[1]: *** [buckets/apr_buckets_eos.lo] Error 1

make[1]: Leaving directory `/src/apr-util'

make: *** [all-recursive] Error 1

 

 

Got anyone the same error, or has somone a newer build instructions as on the log4cxx Wiki?

 

 

Kind regards

 

Ervin

Andrej van der Zee | 4 Jun 2013 22:52
Picon

Unregister please!


Dave Arndt | 4 Jun 2013 19:01
Picon

Compiling with Visual Studio

The old projects that are included with the distribution do not build with Visual Studio 10.


The documentation on the Apache website is also woefully out of date.

Is Log4cxx still being supported?  Or is it dormant (or maybe dead)?
Rhys Ulerich | 28 May 2013 14:24
Picon
Gravatar

Wiki getting spammed

Someone is loading the log4cxx wiki with link spam. I say this because I have been getting notifications with the changes. Can anyone lock it down in some fashion?

- Rhys

Mike | 21 May 2013 19:44
Picon
Gravatar

C++ using Qt and Log4cxx does not show in console

I am attempting to use log4cxx to write to the Visual Studio (2008) console.  However, I am using a Qt library in a Win 32 application that does not use (and won't work) std::cout or std::cerr to print to the console .

I know in the properties file you are able to create you own appenders.  How would I go about doing this to get it to display in the console or is there a better way to approach this?

Regards,
Mike
Wesley J. Miller | 9 May 2013 17:03

Add, enable, disable log4cxx ConsoleAppender at runtime



How would I dynamically turn log4cxx logging to the console on and off in an application?

Goal here is to process a used choice, command line parm or GUI input or whatever. Thus in a hypothetical main loop:

if ( userWantsToStartConsoleLogger )
    ConsoleLogger( true );
if ( userWantsToStopConsoleLogger )
    ConsoleLogger( false );

My logging setup is:

#include <log4cxx/logger.h>
#include <log4cxx/propertyconfigurator.h>
#include <log4cxx/helpers/exception.h>

int main( int argc, char** argv )
{
   const log4cxx::LoggerPtr   logger;
   log4cxx::PropertyConfigurator::configure("./logs.config");
}

where ./logs.config looks like:

log4j.rootLogger=INFO, File

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

log4j.appender.File=org.apache.log4j.RollingFileAppender
log4j.appender.File.File=logs/system.logs
log4j.appender.File.MaxFileSize=1MB
log4j.appender.File.MaxBackupIndex=10
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%d{MM/dd/yyyy HH:mm:ss:SSS a}  %p  %c  %m%n

NOTE: Presently, I have to add , stdout after FILE in the rootlogger= line to accomplish this.

In this context, of course, the question is, what goes in my ConsoleLogger() function?

Thanks,

Wea


CONFIDENTIALITY NOTE:

This e-mail and any attachments are confidential. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation.
dolbydc | 7 May 2013 01:01

RollingFileAppender Exception

All,

I am getting the following error on one machine when running log4cxx, but
the appender works properly on my development VM.

log4cxx: Exception during rollover
log4cxx: No output stream or file set for the appender named
[appxNormalAppender].

Here is my current xml configuration for this.

<?xml version="1.0" encoding="UTF-8" ?>
  <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

  <appender name="appxConsoleAppender"
class="org.apache.log4j.ConsoleAppender">

     <layout class="org.apache.log4j.PatternLayout">

     </layout>
  </appender>

  
  <appender name="appxNormalAppender"
class="org.apache.log4j.RollingFileAppender">

      

      
      <rollingPolicy
class="org.apache.log4j.rolling.TimeBasedRollingPolicy">

      </rollingPolicy>
      <layout class="org.apache.log4j.PatternLayout">

      </layout>
  </appender>

  
  <appender name="appxAuditAppender" class="org.apache.log4j.FileAppender">

      
      <layout class="org.apache.log4j.PatternLayout">

      </layout>
  </appender>

  
  <root>
      <priority value="all" />
      <appender-ref ref="appxNormalAppender"/>
      <appender-ref ref="appxConsoleAppender"/>
  </root>

  
  <category name="audit" >
      <priority value ="info" />
      <appender-ref ref="appxAuditAppender"/>
  </category>
</log4j:configuration>

--
View this message in context: http://apache-logging.6191.n7.nabble.com/RollingFileAppender-Exception-tp37288.html
Sent from the Log4cxx - Users mailing list archive at Nabble.com.

Donevan Dolby | 26 Apr 2013 18:12

ConfigureAndWatch

All,

I have recently inherited a project that is using log4cxx and one thing I want to change is to dynamically change the logging level as the application is running.  This looks like it should be possible using DOMConfigurator::configureAndWatch("./log4cxx.xml", 1000); which should check the log file every second to see if it has changed.  If i change the logging level in the file and save it out it has no affect on my logs, however, if I restart it takes the new settings.  I have attached to the running application and see no watchdog thread that would be checking if the file has been updated.  Any help would be appreciated

Donevan
Madhu Gowda | 23 Apr 2013 16:27
Picon
Favicon

link errors while building a project using static lib of log4cxx in VS 2010

Hi All,

I am trying to build my application using static version of log4cxx in Visual Studio 2010.
I am able to build the log4cxx.lib.
Now, when i try to build my application, it gives 1000's of link errors as follows:
Error    795    error LNK2001: unresolved external symbol <at> __security_check_cookie <at> 4    D:\ISAPI_dependencies\mgowda_ig_isapi93_sp1_patch_view\entecint\integration\WinIS\IdentityGuardFilter\IdentityGuardFilter\IdentityGuardFilter\log4cxx.lib(xmlsocketappender.obj)    IdentityGuardFilter

Error    722    error LNK2019: unresolved external symbol <at> __security_check_cookie <at> 4 referenced in function _normal_prologTok    D:\ISAPI_dependencies\mgowda_ig_isapi93_sp1_patch_view\entecint\integration\WinIS\IdentityGuardFilter\IdentityGuardFilter\IdentityGuardFilter\log4cxx.lib(xmltok.obj)    IdentityGuardFilter

Error    1192    error LNK2001: unresolved external symbol __EH_epilog3    D:\ISAPI_dependencies\mgowda_ig_isapi93_sp1_patch_view\entecint\integration\WinIS\IdentityGuardFilter\IdentityGuardFilter\IdentityGuardFilter\log4cxx.lib(datagrampacket.obj)    IdentityGuardFilter

Error    2367    error LNK2001: unresolved external symbol "public: virtual char const * __thiscall std::exception::what(void)const " (?what <at> exception <at> std <at> <at> UBEPBDXZ)    D:\ISAPI_dependencies\mgowda_ig_isapi93_sp1_patch_view\entecint\integration\WinIS\IdentityGuardFilter\IdentityGuardFilter\IdentityGuardFilter\log4cxx.lib(datagrampacket.obj)    IdentityGuardFilter

Any thoughts on what is going wrong.

Regards,
Madhu Gowda
Damodar Nagapuram | 25 Mar 2013 21:43
Picon

Building libraries with libc++/clang

Hi-

I tried building log4cxx with clang/libc++ a variety of ways with options to ./configure and modifying makefile etc., but every time build says it depends on libstdc++.

I used this command to no avali:
CXX=clang++ CXXFLLAGS="-std=c++11 -stdlib=libc++" ./configure


In order to avoid name mangling issues with my code which is built with, I need to build log4cxx with libc++.

Can anyone please help me with instructions on how I can build log4cxx with libc++/clang?

Thanks,
DG
Rhys Ulerich | 26 Feb 2013 17:42
Picon
Gravatar

http://logging.apache.org/log4cxx/

The API Documentation link on the main log4cxx site, which points to
http://logging.apache.org/log4cxx/apidocs/index.html, is dead.

Anyone out there with admin access that can fix it?

- Rhys


Gmane