473,395 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

log4cxx

Hello,

I have a question about log4cxx. How do I make a new appender class

John
Jul 19 '07 #1
3 2578
Bruintje Beer wrote:
I have a question about log4cxx. How do I make a new appender class
Probably something like

appender* p = new appender;

Beyond that, ask in a forum dedicated to 'log4cxx'.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jul 19 '07 #2
In article <f7**********@news.datemas.de>, v.********@comAcast.net
says...
Bruintje Beer wrote:
I have a question about log4cxx. How do I make a new appender class

Probably something like

appender* p = new appender;

Beyond that, ask in a forum dedicated to 'log4cxx'.
That would create a new appender object. A new appender class would be
something like:

class new_appender : public appender {
// ...
};

--
Later,
Jerry.

The universe is a figment of its own imagination.
Jul 21 '07 #3
On 22 Jul, 00:48, Jerry Coffin <jcof...@taeus.comwrote:
In article <f7oemh$jd...@news.datemas.de>, v.Abaza...@comAcast.net
says...
Bruintje Beer wrote:
I have a question about log4cxx. How do I make a new appender class
Probably something like
appender* p = new appender;
Beyond that, ask in a forum dedicated to 'log4cxx'.

That would create a new appender object. A new appender class would be
something like:

class new_appender : public appender {
// ...

};
You could do with something to append and something to append to,
perhaps something like:

#include <iostream>
#include <string>

template <typename Data, typename Prev=void>
class appender{
public:
appender( Data d_in, Prev p_in): d(d_in),p(p_in){}

Data d;
Prev p;
};

template<typename Data >
class appender<Data, void>
{
public:
appender(Data d_in): d(d_in){}
Data d;
};

template<typename D, typename N>
std::ostream & operator << (std::ostream & os,appender<D,Nconst & a)
{
return os << a.p << ' ' << a.d ;
}

template<typename D>
std::ostream & operator << (std::ostream & os,appender<D,voidconst &
a)
{
os << a.d;
return os;
}

template <typename Existing,typename D>
appender<D,Existing>
append( Existing const & e,D const & d)
{
return appender<D,Existing>(d,e);
}

int main()
{
std::cout << append(

append(appender<std::string>("hello"),'&'),std::st ring("goodbye")
) <<'\n';
}

regards
Andy Little
Jul 22 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Michael CATANZARITI | last post by:
It's a flexible and highly configurable logging framework Main features : - Configurable logging destinations (appenders) - Configurable logging format (layouts) - Categorized logging statements...
10
by: Matthieu Labour | last post by:
Hi, I want to use a c++ version of log4j. But there are 3 of them :log4cpp, log4cplus, log4cx. Whis one is the best ? Thank you
1
by: Dan | last post by:
Hi, I have recently started using log4cxx and have hit a small snag. I am using the DailyRollingFileAppender and noticed that the rollovers are occuring 5 hours before they are supposed to...
5
by: Paul Tremblay | last post by:
Hi, Is anyone aware of a good open-source logging library?. I have searched on google but have not seen anything too useful (don't like log4cpp because of lack of docs, by the time it takes me...
3
by: Konrad Billewicz | last post by:
Hi, I'm looking for a logging engine for C++. I've been using Log4j for Java and I'm looking for something similar, if possible. Log4j port for C++ exists (Log4cxx) but as far as I read it's...
7
by: Jeff Lynn | last post by:
Help! I recently upgraded my VS V6 to VS 2005 and was unable to build projects that were perfectly ok under VS V6. Where VS 2005 fails was in the linker resolving external DLLs, which are Open...
6
by: msosno01 | last post by:
log4cxx is an excellent library for logging with a huge amount features: http://logging.apache.org/log4cxx/manual/Introduction.html My friend persuaded me to install it. However, I have a problem...
2
by: asterixgallier | last post by:
Hello i'm having problems with log4cxx when using inside an MFC application build with visual studio 2005. The Application starts and works normaly, but while exiting, inside the DEBUG window of...
4
by: Quidny | last post by:
Hi, This is a question pertaining to C++, so it seems to me to be on-topic here. If not, I apologize, and would ask which of these forums would be the correct one to used instead. I haven’t...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.