This is my main issue. If someone, Remko maybe?, has a solution using
composite and threshold please let me know as so far I have been unable to make
it work using those. My next step would be to write my own LevelRangeFilter.
Thanks,
Nick
From: nic...@msn.com
To:
On Wed, Aug 26, 2015 at 11:46 AM, Gary Gregory garydgreg...@gmail.com
wrote:
This:
Logger name=HelloWorld level=ALL
is only going to match:
static Logger log = LogManager.getLogger(HelloWorld.class.getName());
if the class in unpackaged, which it looks it is based on this paste but I
We've never released a version 2.0-1.fc21 so it must be a Fedora build,
presumably based on 2.0 or some fork of it.
You need to test with version 2.3 or a 2.4-SNAPSHOT. I'll leave you to
Google how to install 2.3 on Fedora ;-)
Gary
On Wed, Aug 26, 2015 at 12:14 PM, Nicholas Duane nic...@msn.com
This:
Logger name=HelloWorld level=ALL
is only going to match:
static Logger log = LogManager.getLogger(HelloWorld.class.getName());
if the class in unpackaged, which it looks it is based on this paste but I
want to double check that you did not omit anything from the example.
Are you using
On to my next problem. I'm trying to define a custom level in configuration.
Not sure if it's working or not. However, when I attempt to get the level for
that custom level I get back null, which I wasn't expecting. Here is the
log4j2.xml config file:
?xml version=1.0 encoding=UTF-8?
First off let me admit that I'm a noob at both Linux and java, and log4j for
that matter.
I don't know how to package anything so my class that you see is a simple java
class which I compiled using javac. I then run it using 'java HelloWorld'.
I'm running fedora 21. When I do a 'yum list
On Wed, Aug 26, 2015 at 9:42 AM, Nicholas Duane nic...@msn.com wrote:
No, I don't know what monitorInterval is.
Please see
https://logging.apache.org/log4j/2.x/manual/configuration.html#AutomaticReconfiguration
Gary
Right now in log4net, which is where I'm redefining OFF, we have the
On Wed, Aug 26, 2015 at 10:52 AM, Nicholas Duane nic...@msn.com wrote:
This is my main issue. If someone, Remko maybe?, has a solution using
composite and threshold please let me know as so far I have been unable to
make it work using those. My next step would be to write my own
Yes I am a true noob to java and linux and log4j.
What is gitmaster? I assume related to github somehow? How can I see the test
you created? Is there a link you can provide?
Thanks,
Nick
Date: Wed, 26 Aug 2015 12:34:45 -0700
Subject: Re: custom levels via configuration
From:
On Wed, Aug 26, 2015 at 9:27 AM, Nicholas Duane nic...@msn.com wrote:
Maybe what I'm trying to do is not that useful. However, I'm guessing the
person mucking around with things would probably feel uncomfortable
deleting entries in the config. If they are familiar with log4j they might
feel
Can’t you just put a comment in the config file that states the minimum logging
level is info and that it is not to be changed under any circumstances?
Ralph
On Aug 26, 2015, at 9:27 AM, Nicholas Duane nic...@msn.com wrote:
Maybe what I'm trying to do is not that useful. However, I'm
On Wed, Aug 26, 2015 at 9:19 AM, Nicholas Duane nic...@msn.com wrote:
I guess the main use case we're trying to solve is someone, maybe some
admin or maybe a developer asking the admin, thinking they should turn
logging off and thus sets the level to OFF. We always want INFO and more
I should have add:
ways to enforce that via configuration. We don't want to do it via code and
we don't want to have to rely on some of our code being run at startup.
Thanks,
Nick
From: nic...@msn.com
To: log4j-user@logging.apache.org
Subject: RE: redefining existing levels?
Date: Wed, 26
On Wed, Aug 26, 2015 at 9:31 AM, Ralph Goers ralph.go...@dslextreme.com
wrote:
Can’t you just put a comment in the config file that states the minimum
logging level is info and that it is not to be changed under any
circumstances?
That seems to obvious! :-)
Another interesting but complex
I think it is still unclear what you mean by below. Normally I would
consider trace to be at the low end and fatal to be at the high end,
but I don't think there is a low and high in Log4J. When you say below
I take it you mean DEBUG and TRACE, but the only thing that makes sense
to me is to
Well, I suppose we could add a minimum logging level system property and if
someone tries to set the level lower than that then the minimum level gets used
instead. But I’m not really crazy about that as it could cause all kinds of
“unexpected” consequences when processing the configuration.
Op 26-8-2015 om 5:43 schreef Gary Gregory:
On Tue, Aug 25, 2015 at 7:59 PM, Remko Popma remko.po...@gmail.com wrote:
How are users currently able to set the log level to OFF? Do they modify
the config?
Right, isn't the only way to enforce this is to override the config file
programatically?
I guess the main use case we're trying to solve is someone, maybe some admin or
maybe a developer asking the admin, thinking they should turn logging off and
thus sets the level to OFF. We always want INFO and more critical levels to
be on no matter what.
Thanks,
Nick
Subject: Re:
Maybe what I'm trying to do is not that useful. However, I'm guessing the
person mucking around with things would probably feel uncomfortable deleting
entries in the config. If they are familiar with log4j they might feel
comfortable setting the level if they think they should be turning
No, I don't know what monitorInterval is. Right now in log4net, which is
where I'm redefining OFF, we have the log4net configuration in the application
configuration file. So it for instance it's a web application, touching the
log4net configuration will restart the application domain.
I'm one of the developers in the framework team. We're working on a logging
framework. Let's say the enterprise direction is to always capture INFO and
more critical. If someone, who happens to have access to the server(s), does
something they think they should do but in fact they shouldn't
Yeah, that should do it. Again, it might be the case that I'm trying to solve
something that doesn't need to be solved. Since it seemed there was an extra
hole I could close, suspenders and belt so to speak, using log4net and
redefining OFF to the value of INFO, I was wondering whether the
Start reading here:
- Main site: https://logging.apache.org/log4j/2.x/
- Source code: https://logging.apache.org/log4j/2.x/source-repository.html
- This ML
Git is the source control system we use.
Git master refers to the main branch of development with Git.
Gary
On Wed, Aug 26, 2015 at
The current version of Log4j has more internal logging than past ones, but
maybe not in this area.
If Yum or whatever installer Fedora likes best does not do what you want,
you can download the 2.3 jars from the Log4j site and put them in your
classpath.
Gary
On Wed, Aug 26, 2015 at 2:34 PM,
Thanks for clarifying.
My effort to try to get the composite + threshold filter working such that I
can filter a single level so far has failed. Here is my code:
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.Level;
public
Hmmm, I thought for log4j the threshold was less than or equal to the level.
For instance, if the threshold is INFO then INFO and less than, eg more
critical like WARN ERROR and FATAL would match. It's opposite in log4net.
Regardless, this is the issue I wanted to point out. The
I apologize, you are correct. The level values do decrease.
Regardless, your point about wanting to filter on essentially a single integer
value makes sense.
Ralph
On Aug 26, 2015, at 6:12 AM, Nicholas Duane nic...@msn.com wrote:
Hmmm, I thought for log4j the threshold was less than or
I am glad I asked these questions.
In my opinion, you cannot protect people from messing up your configuration
by providing them with some configuration, for the simple reason that they
can modify your changes.
I am also with Ralph in that I am not a fan of a minimum log level that
would ignore
Nick,
What was the output of this program? Were both INFOM1 and INFOP1 not found,
or was INFOM1 found (because it is used in the ThresholdFilter), but not
INFOP1?
Remko
On Thu, Aug 27, 2015 at 3:19 AM, Nicholas Duane nic...@msn.com wrote:
On to my next problem. I'm trying to define a
Both were not found from my HelloClass. And I had sent out some log4j logging
in where there was a warning which I assume was related to me using INFOM1 in
the threshold filter.
Thanks,
Nick
Date: Thu, 27 Aug 2015 08:20:20 +0900
Subject: Re: custom levels via configuration
From:
I don't have time to investigate now, but it looks like our support for
CustomLevels is not implemented in ThresholdFilter yet.
If you use a custom level in your logger config it should work. For example:
loggers
root level=INFOP1
appenderref ref=file level=INFOM1 /
...
Remko
On Thu,
That would certainly be a possible explanation. I'm working on figuring out
how to upgrade to log4j 2.3. Hopefully that will solve my custom levels issue.
Thanks,
Nick
Subject: Re: custom levels via configuration
From: ralph.go...@dslextreme.com
Date: Wed, 26 Aug 2015 17:05:02 -0700
To:
It seems my custom levels aren't working as I'm getting null from
Level.getLevel() when passing those custom level names.
Thanks,
Nick
Date: Thu, 27 Aug 2015 08:34:43 +0900
Subject: Re: custom levels via configuration
From: remko.po...@gmail.com
To: log4j-user@logging.apache.org
I
Custom log levels weren’t added to Log4j 2 until version 2.1, so if the version
you are using is older than that it is no surprise that it isn’t working.
Ralph
On Aug 26, 2015, at 2:34 PM, Nicholas Duane nic...@msn.com wrote:
While I work on figuring out how to get a newer version of log4j2
While I work on figuring out how to get a newer version of log4j2 installed I'm
wondering whether there is some additional investigation I can do with the
version I have. For instance, I was hoping with the level of logging I have
enabled, that log4j would be indicating some issue it had with
35 matches
Mail list logo