Hi.. I am new to Log4j and I as I was going through
the mannual I saw MyApp. java. With BasicConfigurator.configure() the
program works fine. But when I use PropertyConfigrator, where to keep the
properties file. How should I name the
properties file? Is it *.properties? When I run the
java
Try the
following:
public static Category CAT =
org.apache.log4j.Category.getInstance(Log4jEmailTest.class.getName());
public static void main(String[]
args) { String fileName =
"c:/tmp/log4j.config"; File checkFile = new
File(fileName); if (fileName != null && new
HI
You can name the extention property file as the way
you like but as a general rule u may name it to *.properties as we can know in
future that this file is a property file.
How to use it.
1.If you are using Log4j for Stand alone
application then put in the directory from where u are runni
Hi Suneel..
Thanks for your prompt reply. I have
put the properties file in the same directory only. Do we have to pass it an
argument to the code? When I execute the same example given in the manual
it gives the following error at run time .. the location is
PropertyConfigurator .configu
Hi all,
in an application I use a class which logs via category "sub" while the
application itself logs via category "main" and "main.special". "main" and
"main.special" are configured by DOMConfigurator.
Is there a (simple) way to assign the same logging behaviour (including the
same inhert
Hello Log4j,
I'm adding my own conversion specifier %v{option} using subclassed
PatternLayout, PatternParser and PatternConverter. I have a small
problem with the {option} part. There doesn't seem to be a method for me
to extract it. In the finalizeConverter method of my PatternParser subclass
I agree, I have a similar problem for doing %x{} and I think those methods
should be protested.
I too have copied the entire methods in my subclass.
Thanks
-Original Message-
From: Ernie Parker [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 11:00 AM
To: [EMAIL PROTECTED]
Subject
Agreed. I've made those methods protected in the CVS archive.
Anders
Ernie Parker wrote:
>
> Hello Log4j,
>
> I'm adding my own conversion specifier %v{option} using subclassed
> PatternLayout, PatternParser and PatternConverter. I have a small
> problem with the {option} part. There doesn't
I haven't tried it but it should be. All the configuration
'work' is done by the configuration classes in the Log4J
framework, so as long as the appender has the appropriate
get/set methods and the config file addresses those then it
should work 'out of the box' so to speak. Thank Ceki for a
pro
I've extended Category and Priority to add a new Priority called AUDIT (higher
than FATAL).
I used both the XCategory and XPriority as examples, as well as the AppServer
example.
I modified XTest.java to run my changes and used a modified sort1.lcf file as
the
properties files.
Here is the output
I am having a problem that the documentation discusses but
doesn't seem to give a clear enough solution.
I have my extended both Category and priority using the examples
provided. I am getting the ClassCastException problem
(as alluded to in docs\api\org\apache\log4j\examples\doc-files\mycat.goo
11 matches
Mail list logo