Log4J - file appender (2/more file for same package/class)
Hi All,
My requirement is i want to create 2 log file for same package.
EG: com.foo.bar
my code:
log4j.rootCategory= ALL, fileAppender,stdout
log4j.appender.fileAppender=org.apache.log4j.RollingFileAppender
log4j.appender.fileAppender.File=c:\\temp\\test.log
log4j.appender.fileAppender.MaxFileSize=64KB
log4j.appender.fileAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.file1=org.apache.log4j.RollingFileAppender
log4j.appender.file1.File= file1.log
log4j.appender.file1.MaxFileSize=64KB
log4j.appender.file1.MaxBackupIndex=1
log4j.appender.file1.layout=org.apache.log4j.PatternLayout
log4j.appender.file1.layout.ConversionPattern=%p %t %c - %m%n
log4j.appender.file2=org.apache.log4j.RollingFileAppender
log4j.appender.file2.File= file2.log
log4j.appender.file2.MaxFileSize=64KB
log4j.appender.file2.MaxBackupIndex=1
log4j.appender.file2.layout=org.apache.log4j.PatternLayout
log4j.appender.file2.layout.ConversionPattern=%p %t %c - %m%n
log4j.appender.file3=org.apache.log4j.RollingFileAppender
log4j.appender.file3.File= file3.log
log4j.appender.file3.MaxFileSize=64KB
log4j.appender.file3.MaxBackupIndex=1
log4j.appender.file3.layout=org.apache.log4j.PatternLayout
log4j.appender.file3.layout.ConversionPattern=%p %t %c - %m%n
// THIS IS FOR ClIENT
log4j.logger.com.ls.es.service=DEBUG, file1
// THIS IS FOR SUPPORT
log4j.logger.com.ls.es.service=DEBUG, file2
// THIS IS ERROR MESSAGE
log4j.logger.com.ls.es.service=ERROR, file3
Here file1 is for Client(Client Admin)and file2 is for Support.
but am getting only file3.log file which is for Error Message..
some where configuration is missing...
Thanks,
by
dhana
I have created a class that allow to create easily new logs:
1.- Switch the Root Logger output
2.- Create as many logs as desired (I build a simple web server, each new client has a log associated to it).
Main problem: code and comments in spanish.
Are you intereseted on it? Let me know, I can send it to you by mail.
Cesar
Similar Messages
-
Help! How to create Jar file for a packaged class?
Hi!
I am new in jar complexities. I made a swing frame that just prompts a JOptionPane when executed. I accomplished the same using jar without packaging my class SwingTest.
But when i package it, it doesn't run. Can any one tell me how to make jar file of packaged classes and include images in the jar files too!
Really Thanx!Call the Jar from the commandline to see the exceptions thrown.
java -jar <jarFileName> <className> -
Multiple web catalog files for same rpd
Is there any way to run multiple web catalog files for same rpd in OBIEE?
Why do you want to do that? Why not merge them into one? You run seperate presentation servers againt the same RPD.
Regards
John
http://obiee101.blogspot.com/ -
Reset config files for a package
According to https://wiki.archlinux.org/index.php/Pa … save_Files I have this situation in my config files:
original = X, current = Y, new = X
Is there a way to set current config files of package to X and save Y as .pacsave OR install X as .pacnew and leave Y in place without removing package?
Last edited by Evgeniuz (2012-03-12 22:00:00)I'm not positive I'm understanding you right, but if I am and you are talking about basically backing up a package's config file, it is pretty simple. I believe the .pacnew and .pacsave refers to changes in the makeup of a package in general, not its config file.
To change back to the original config and save the modified version you can just add .backup or anything onto the end of the file that you don't want to use right now . Then, you just need to save the file that you want to use as the config file with wthe filename of the configuration file for that package (so the same but w/o the .backup).
Sorry if I am misunderstanding you and you really did mean .pacnew or .pacsave and not config files. Or if I am totally wrong but that is my understanding of config files and I know it has worked for me in multiple instances.
~Boz~ -
Creation of one single config file for 100 packages
Hello Everyone,
I need to create a single config file for multiple packages. Is it possible to do it?
Could you please let me know how can it be achieved?
Regards,
ChinniIts possible
Depending on whether all packages contain same configuration items and names you can use any of below approaches
1. If all package configuration items and names are same, you can point all packages to same config file and it will use values from file for all of them
2.If packages have different set of conigurations, then one method is to use parent package (wrapper package) to call and execute all of them. Then define all configurations as variable values in parent and add a config file in it. Pass only required configurations
to each of child packages by using parent package configuration method.
http://www.sqlis.com/sqlis/post/Using-Parent-Package-Variables-in-Package-Configurations.aspx
The parent package has to call child packages using execute package task
Then change any of values in your config file for parent package and change gets reflected to child package property values.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Revision: 1548
Author: [email protected]
Date: 2008-05-03 03:48:18 -0700 (Sat, 03 May 2008)
Log Message:
Added @exclude to Javadoc package-info file for this package.
Modified Paths:
blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/cluster/package-info.javanbd wrote:
How could one interpret this?
[root@kw etc]# checkupdates | grep pcre
pcre
[root@kw etc]# pacman -Si pcre | grep Version
Version : 8.37-1
[root@kw etc]# pacman -Qi pcre | grep Version
Version : 8.37-1
[root@kw etc]#
Ok, after updating your original post and asking this question I understand what you are actually trying to do. The "local package database" generally refers to /var/lib/pacman/local, not /var/lib/pacman/sync, which is why it was unclear.
fakeroot pacman -Syb /tmp/tmpdb -i pcre
should do what you want, but be very careful never to install anything using that temporary database. Take a look at the checkupgrades script to see how it does things if you want to do more than just check remote package info. -
[SOLVED] -Qkk shows "no mtree file" for all packages
When running pacman -Qkk after the upgrade to 4.1.0, I am now getting "no mtree file" for all packages on my system. These errors did not occur prior to the upgrade, and I upgraded no other packages. Does this indicate breakage? How should I fix this?
Last edited by cdown (2013-04-05 02:05:35)Allan wrote:The only way to fix this is to rebuild all packages using makepkg from pacman-4.1....
So this is not breakage that I can fix on my end, then?
I looked at the libalpm source for information about mtrees, it looks like they are used to provide package integrity validation, but it's possible I'm wrong since I only read a small part of the code on mtrees. I'd appreciate information about what they are and what issues lacking them could cause. -
ICR - Upload multiple files for same company code?
Hello,
I have a question regarding the file upload functionality for ICR.
The file has to be prepared in MS Excel and then saved as tab delimited, but MS Excel has a limited number of rows.
So ....if one of my companies needs to upload more than one file for the same process/period because of this number of rows limitation, would that be possible? How is it handled and how we do we prepare the system for it?
Thanks for your help.
Regards
IsabelHello Isabel,
Actually this question is not quite answered yet...
The problem is that during data selection you can only choose one file per company/seqnr. In your sceneario each file represents a data source. So you need to create one entry per file in FBICRC01010 (e.g. FBIC032). If you were to run data selection once and choose one file and then run data selection again and choose a different file, the data from the first file would be deleted.
And you can split up a document in the middle. ICR considers each data record individually. There is no balance zero check or anything - since you usually transfer individual line items anyway.
Best regards,
Ralph -
.rdl file for ssis package execution reports.
Can I get a .rdl file for the SSIS Packages execution report which shows execution timing status and etc.. .where it stores (location) and possibility of the Stored procedure for the .rdl file
Not sure where the SQL Server is storing the .rdl file for the above mentioned reports. But if you just want to get summary of ETL execution you can use something similar to below query and create your own report in SSRS.
SELECT e.executable_id AS [ID] , CASE es.execution_result when 0 then 'Success' when 1 then 'Failure' when 2 then 'Completion' when 3 then 'Cancelled' END AS [Status] , ex.folder_name AS [FolderName] , ex.project_name AS [ProjectName] , e.package_name AS [PackageName] , CONVERT(datetime, es.start_time) AS [StartTime] , CONVERT(datetime, es.end_time) AS [EndTime] , CAST(es.execution_duration AS float)/1000 AS [Duration]FROM catalog.executables e INNER JOIN catalog.executable_statistics es ON e.executable_id = es.executable_id AND e.execution_id = es.execution_id INNER JOIN catalog.executions ex ON e.execution_id = ex.execution_id AND es.execution_id = ex.execution_idWHERE package_path = '\Package'ORDER BY StartTime DESC
More info can be found
here. -
How to make .jar file for a multiple class program
I have a code for a chat room that contains two folders , one for Server and one for Client
What I need is to create a jar file for the server and a jar file for the clients
but here the first problem , I have a file that named (SocketMessengerConstants.class) that is located outside the two folders and is being read by the two projects .
I mean the server uses it while running and the client uses it too .
the second problem is : I don't know how to create a jar file at all !
please tell me how to do it in detail
Thank youChuckBing wrote:[Packaging Programs in JAR Files|http://java.sun.com/docs/books/tutorial/deployment/jar/index.html]
I tried to read this tutorials before I come here but I couldn't understand it
can you please tell me a specific steps to follow instead of the explaining .. because I understand the explanation but I can't apply it -
2 files in same package and depends each other need import package??
test1.java and test2.java are in the same package mypackage,
and test1.java will call methods in test2.java, does it mean
test1.java needs to import mypackage.test2;
i.e.
//test1.java
package mypackage;
import mypackage.test2;
class test1
}no, once classes are in the same packages they are picked up ie tc1 is in tc_package and tc2 is also in tc_package, tc1 need not import tc_package.tc2 to use tc2 methods.
/Paul -
2 files in same package need import package??
test1.java and test2.java are in the same package mypackage,
and test1.java will call methods in test2.java, does it mean
test1.java needs to import mypackage.test2;
Because I found sometimes it won't compile test1.java without import mypackage.test2..
i.e.
//test1.java
package mypackage;
import mypackage.test2;
class test1You shouldn't need to import a class that lies in the same package.
Cyric -
Binding file for controlling package name
I looked at the related links, tried a few examples, not much success...
I realize this can be solved with more effort, but just trying the easy path, so ... ignore this if looks unreasonable, I know how busy developers feel...
Is there a good example to conform to these requirements:
Basically i would like binding file as a child element for wsdlc running in JAXWS mode that will follow package naming rules for JAXRPC... meaning:
Java files generated from xsd will match package name with xsd name space, while for JWS classes control specific package name ...
Most of my attempts failed due to xpath complaining for not finding any element for the node ...
Binding attempt 1: make all classes serializable
============================
<jaxws:bindings
xs:schemaLocation="Customer.xsd"
node="/xs:schema">
<jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jxb:serializable/>
</jxb:globalBindings>
</jaxws:bindings>
Binding attempt 2: keep same name for xsd classes
============================
<schemaBindings>
[ <package> com.myown.pack</package> ]
[ <nameXmlTransform> http://xmlschema.my.xsd.com/CustomerCall </nameXmlTransform> ]*Yes, select the project in the mapping workbench, click on the "Defaults" tab.
There's a checkbox called "Specify Project Package".
Darren
Is there is way to specify a package name for the java file generated when you export a project.
Thanks,
Rajiv -
XML file for loading different classes in application ?
Hi,
I want to configure a small application ( a simulator ) using a XML file. The XML file determines the classes, whih should be loaded, and initialize the variables (values set in the XML files). I want to have different modules (same functionality, different implementations) and which module is loaded, is determined by the XML file ( a scenario ).
I am not sure, how can I implement it ? Should I use Java Beans with XMLBeans ? Is there a standard way for doing this ? I will appreciate any advice.
Thanks in advance.
BobiI used the java class loading capability using the following code snippet
public void loadPlugin(String entrypoint, String name)
Plugin plugin;
Class c;
try
c = Class.forName(entrypoint);
plugin = (Plugin)c.newInstance();
plugin.setName(name);
plugin.setConnection(DBHandler.getConnection());
plugin.setParameters(_pluginReader.readParameters(name));
if (plugin != null && _plugins != null)
_plugins.add(plugin);
catch (Exception e)
e.printStackTrace();
}I have to add that I have an interface called Plugin that specifies the above mentioned method stubs. -
Get more space for same apple id
hello
i have a iphone 4 and a ipad3 and connected them by my apple id, however it has now used all my data on icloud .......
surly apple will or should give me 10 gb on the same apple id .... 5gb for iphone and 5 for ipad ....
i dont want to create a new one as i wont be able to share etc ! and to buy it will be unfair if you ask me
any help would be great
anthonyIt's 5 GB per account, if you need more you will need to purchase it.
Maybe you are looking for
-
help! i really want to use this app, but i don't know what to do
-
Applescript to open various files and add info from filename to the file
Hi guys, first time using this forum... and first time trying to do a script for apple... I figured out how to do simple things... like open files and stuff to text files... but don't know where to begin: I have a directory datalogs... within the di
-
Want to change subscription plan from unlimited wo...
I recently subscribe for unlimited world plan which is very good but it did not include china. I would like to upgrade to the ¥1800 unlimited world china plan. Does it mean I will be charged at extra ¥700 this month from the original ¥1100 world plan
-
GoldenGate replication of creating users, roles
System Specs: O/S : RHEL 5 (Tikanga) RDBMS: 11.2.0.3 (Standalone, ASM, Archivelog) GoldenGate v:11.1.1.0 (getting ready to upgrade to v11.1.1.2 (want to utilize the ADD SCHEMATRANDATA and updated sequence support) I have read the documentation in GG
-
Hello everyone, My wife has a clinic behind our house, that does not currently have a hard wired ethernet connection. We are wondering if we can use our old 2nd generation time capsule to pick up the wirless signal from our home, and then use the LA