We have a wrapper for log4j 2 APIs. So instead of directly calling the
function we call custom class to do the logging. The problem with this
aproach is the 'source' field stored in database has details of the custom
log class and not the class which is calling it i.e all my fileName ,
linenumber
Hello,
I'm using log4j2 RollingFileAppenders to log events of a complex system. My
problem is that empty log files are created for every appender even if the
given subsystem has nothing to write to them. Is there any way to restrict the
number of files using just the XML configuration file?
Hi,
Can you provide your configuration file?
Remko
On Wed, Sep 16, 2015 at 11:23 PM, Csilla Fabian
wrote:
> Hello,
>
> I'm using log4j2 RollingFileAppenders to log events of a complex system.
> My problem is that empty log files are created for every appender even if
>
The files are created as soon as the output stream is opened. This happens when
the Appender starts. I’d have to see your configuration to understand why you
would be getting multiple files though.
Ralph
> On Sep 16, 2015, at 7:23 AM, Csilla Fabian wrote:
>
> Hello,
>
I was hoping on getting some replies to my last message as I'm trying to figure
out the best way to utilize the existing logging frameworks, log4j(2) and
log4net in our case, to log our business events and ensure the business events
flow to the correct destination.
I think the two main
Sending to both the log4j and log4net mailing lists.
I'm curious why log4net is not more similar to log4j(2)? Is it because there
is less development work being done on log4net and log4j had significant
changes in the 2.0 version? Any chance log4net might become more of a "port"
of log4j(2)
At first I was going to strongly recommend against using a custom level
called BUSINESS. Custom levels have been a problem in the past at my work
(IMO). Markers are really a perfect fit for this use-case. That got me to
thinking about my previous idea on this of adding more levels to Log4j.
Please
Wait a sec, you should look into the ExtenderLogger APIs!
For example:
org.apache.logging.log4j.spi.ExtendedLogger.logIfEnabled(String, Level,
Marker, String, Throwable)
Where you can pass in the FQCN of your logger class. That should do it.
Gary
On Wed, Sep 16, 2015 at 1:25 PM, Gary Gregory
It sounds like you would need to specify how many stack frames to skip
before coming out of your wrapper class.
This could be done by adding a 'skip' parameter to the 'location'
attribute, like '%location{skip=2}' or something like that.
FYI:
First of all let me say that I'm not trying to keep posing the same question
until you guys agree with me. I'm just trying to make sure I've done my due
diligence to root out all possible options so that I can pick the one which
ends up working out the best for our needs.
That being said,
I was debating offering to help. Not that I wouldn't be interested, just don't
know how much time I could commit. Also, not sure I would be interested in
"patching" log4net. In my mind the best approach would be to port log4j2. I
would like the two to be very similar, down to the level
Maybe
helpful:http://codecall.net/2014/03/27/best-tools-to-convert-java-to-c-source-code/
Gary
Original message
From: Nicholas Duane
Date: 09/16/2015 17:58 (GMT-08:00)
To: Log4J Users List
Cc: Log4NET User
Porting Log4j 2 would be a *huge* job. Would you use a translator of some
kind?
Gary
On Wed, Sep 16, 2015 at 3:41 PM, Nicholas Duane wrote:
> I was debating offering to help. Not that I wouldn't be interested, just
> don't know how much time I could commit. Also, not sure I
I actually haven’t looked at log4net, but since it predates Log4j 2 I would
imagine it is missing the new features we added.
Using your own custom messages is certainly a viable approach. But there again,
logging Message objects instead of simple strings is something that was
introduced by
Not sure. I was going to ask what a guess on the effort might be. I wasn't
expecting *huge*. And I guess *huge* is still your guess if we only consider
the "core" and maybe a single file appender just as a starting point?
Thanks,
Nick
Date: Wed, 16 Sep 2015 15:49:22 -0700
Subject: Re: Why
It's not so much that one appender is more code than another. It's all the
infrastructure underneath it all...
Gary
On Wed, Sep 16, 2015 at 5:06 PM, Nicholas Duane wrote:
> Not sure. I was going to ask what a guess on the effort might be. I
> wasn't expecting *huge*. And I
I was thinking maybe the sheer number of appenders/filters would make it a lot
of effort to port the entire list and just porting the core infrastructure and
maybe one appender just so that you could see something working might
something, while a large effort, wouldn't be huge. But I guess
Well, it might be huge but I’m guessing it would be a lot of fun!
Ralph
> On Sep 16, 2015, at 5:06 PM, Nicholas Duane wrote:
>
> Not sure. I was going to ask what a guess on the effort might be. I wasn't
> expecting *huge*. And I guess *huge* is still your guess if we only
18 matches
Mail list logo