Security hotfix APSB11-04 - CF8 and log4j.properties
Hi,
I have been reviewing the Tech Notes for the security hotfix at http://kb2.adobe.com/cps/890/cpsid_89094.html which for CF 8.01 talks about backing up and replacing the log4j.properties file. I can't locate this on any of our CF 8.01 servers, so wondering if this is a mistake in the tech note and should have only applied to CF 9. Can I skip the step all together or do I still need to copy the file from the downloaded hotfix to the suggested location?
Thanks
Meint
Hi Meint,
My CF8.0.1 does not have log4j.properties file either tho CF9.0.1 has.
HTH, Carl.
Similar Messages
-
How can configure .properties file and log4j on weblogic 8.1 SP5
Hi,
I know this is not right forum for post this question.But I hope I'll get my perfect answer here.
I have 2 questions.
1. Where I'll keep my .properties file in weblogic 8.1 SP 5. means I have one own .properties file which is contains some proxy settings and this .properties resides on .war file(now), But I want move this propeties file outside .war file. So Where I'll keep in weblogic 8.1 SP 5.
2. How can we configure log4j in weblogic?
Please reply me.
Regards,
PattanaikYou can add your.properties and log4j.properties to the classpath cant you?
You just need to edit setEnv.cmd (if i remember correctly) in your weblogic server folder to add the folder containing the properties files to the classpath variable. -
Access log4j.properties outside source folder
Hi,
I have developed a standalone java application, for logging the application i have created a log4j.properties in the source folder.
it is woring fine and the logs are created as specified in the properties file.
Issue:
i have created a jar which contains the complete source code and log4j.properties file.
if i try to create a jar without log4j.properties since the properties file will change by customer frequantly, i need to keep the log4j.properties outside the source folder.
but my jar is unable to access the log4j.properties when i try to run the appplication.
Question:
how do we access the log4j.properties from outside source folder?
thanks,
J Rgimbal2 wrote:
T.PD wrote:
In addition what gimbal2 sad: Do you create a MANIFEST.MF file in your jar?
If so you should add (or extend) the ClassPath entry to include the current directory ( *.* ) so you can have the log4j.properties file in the folder where you call your jar from:[...]This is very dangerous. It makes the path not relative to where the jar is, but to where you invoke the java command.The OP's request is to have the (log4j) properties file outside of the jar maybe for easier editing.
Adding any known folder in the file system to the class path is the only way I know to achieve this (Do you know better?). Folliwing this you could try to guess paths to add hoping that they will exist on all Systems you will use and place the properties file(s) there. On the other hane the current working dir the java command is invoked in is perdictable. Usually it's the directory the jar itself is located...
I agree that this solution can be dangerous and opens the possibility to access classes located in a valid package structure below current working dir . But if you add the ' *.* ' as the last entry in your classpath at least the classes from all your other jars are accessed first...
bye
TPD -
Problem with log4j.properties and level DEBUG
Hi,
I need some log4j help.
I create 2 different appenders in the log4j.properties file
and it works.
This is my complete log4j.properties:
log4j.logger.log1=DEBUG, log1
log4j.logger.log2=DEBUG, log2
log4j.appender.log1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.log1.File=${StandardLogPath}
log4j.appender.log1.DatePattern='.'yyyy-MM-dd
log4j.appender.log1.Append=true
#log4j.appender.log1.Threshold=DEBUG
log4j.appender.log1.layout=org.apache.log4j.PatternLayout
log4j.appender.log1.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} [%-5p] %-25c{1} %m%n
log4j.appender.log2=org.apache.log4j.DailyRollingFileAppender
log4j.appender.log2.File=${StandardLogQueryPath}
log4j.appender.log2.DatePattern='.'yyyy-MM-dd
log4j.appender.log2.Append=true
log4j.appender.log2.layout=org.apache.log4j.PatternLayout
log4j.appender.log2.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} [%-5p] %-25c{1} %m%nAnd here's my logging code:
import org.apache.log4j.Logger;
Logger log = Logger.getLogger("log1");
Logger logQuery = Logger.getLogger("log2");
log.debug("loggerDebug");
logQuery.debug("loggerDebug");
log.info("loggerInfo");
logQuery.info("loggerInfo");The problem is that "loggerDebug" is not written to all appenders (only "loggerInfo").
In fact if I print:
System.out.println( log.getEffectiveLevel().toString() );result that the level is INFO and I known that if level is INFO then DEBUG is disable.
But why the level is INFO????
Someone can suggest me a solution?
Thank you very muchYou're so over-sensitive you: when an OP doesn't respond anymore
to your last reply it implies that you've solved the problem and
(implicitly) that the OP is very grateful to you. Why do you always
have to be so explicit about matters? ;-)
Because I'm not one of those Dutch people ;-)Yes, that's us, the Dutch: mysteriously smiling and keeping silent all the
time. That's why they call us the Asians of Western Europe ;-)
ps. There are nice exception to the rule sometimes though.
Yes, and unfortunately they do seem to be the exception rather than
the rule. It would be nice to catch one a bit more often.True; that's the internet generation: grab all the information that you can
and don't give a f*ck about the guy who supplied the information. It's sad
indeed.
Maybe we should start a support group where we could thank each
other now and then 'on behalf' of those little spoiled brats and complain
about all those bad manners nowadays ;-)
kind regards,
Jos -
Log4j.properties location for ant and kodo tools
Greetings all
Is it possible to configure the kodo ant tasks,
such as jdoc (kodo.ant.JDOEnhancerTask) to use
a log4j.properties file that is not in the
classpath?
We generally have our log4j.properties
file in a separate location away from the classpath
and for standard junit and java ant targets we can
set it's location via a jvmarg...
Version: 3.0.0
Thanks
droo.Ok thanks for the help.
Perhaps I could suggest for a future version that the
Kodo Ant Tasks include the ability to specify a "jvmarg"
like you can for java and junit targets now, for example:
<taskdef
name="jdoc"
classname="kodo.ant.JDOEnhancerTask"
classpathref="compile.path" />
<jdoc>
<fileset refid="all.jdo.files" />
<classpath refid="other.path" />
<config propertiesFile="${kodo.properties}"/>
<jvmarg value="-Dlog4j.properties=file:///my/log4j/config" /
>
<jvmarg value="-Djava.compiler=NONE" />
<jvmarg value="-Dfred=mary" />
</jdoc>
But if not then it's ok too :) Thanks again.
droo.
Droo-
I'm not aware of an ant task to set system properties. You could
specify it on the command line. E.g.,:
ant -Dlog4j.configuration=/my/log4j/config mytarget
You could also install beanshell and use the beanshell target to set
it. E.g.:
<target name="setlog4jproperty">
<script language="beanshell"><![CDATA[
System.setProperty ("log4j.configuration", "/my/log4j/config");
]]> ]]></script>
</target>
See the ant documentation for more on the required dependencies for
beanshell.
In article <[email protected]>, droo wrote:
Yes of course, but the real question is...
How do I specify a system property for a
kodo ant task?
Sorry if this question is too stupid!
Here is what I have...
<taskdef
name="jdoc"
classname="kodo.ant.JDOEnhancerTask"
classpathref="compile-path" />
<jdoc>
<fileset refid="all-jdo-files" />
<classpath refid="post-compile-path" />
<config propertiesFile="${nf.kodo.properties}"/>
</jdoc>
In <[email protected]> Marc Prud'hommeaux wrote:
Droo-
I think you can specify the "log4j.configuration" system property.
Take a look at:
http://jakarta.apache.org/log4j/docs/manual.html
In article <[email protected]>, droo wrote:
Greetings all
Is it possible to configure the kodo ant tasks,
such as jdoc (kodo.ant.JDOEnhancerTask) to use
a log4j.properties file that is not in the
classpath?
We generally have our log4j.properties
file in a separate location away from the classpath
and for standard junit and java ant targets we can
set it's location via a jvmarg...
Version: 3.0.0
Thanks
droo. -
Log4j.properties and weblogic server (e.g . 8.1)
Hi,
For the moment I have to put the log4j configuration file "log4j.properties" under the folder "WEB-INF/classes". Otherwise, I will get
log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources).
log4j:WARN Please initialize the log4j system properly.
The shortcoming of this solution is to put a "static" file "log4j.properties " in a "dynamic" folder "classes" that might be cleanned by some Java IDE clean function (e.g. eclipse).
Do you have any wisdom to remove this inconvenience?
Regards,
Pengyouyou will have to wait for WLS 9.0.2
Chris Jolley
Portal Architect -
HI,
I have installed Cumulative Update 12 for SQL Server 2008 R2 SP2 on my SharePoint instances. This was to resolve a known issue faced with the instance. CU12 helped resolve the issue. My company is rather strict regarding security hotfixes. But I am
not sure if this particular hotfix [Security Hotfix (KB2977319)] is required if the instance has CU12 applied.
Tested this on a Lab server, the installation did run fine, the summary log also stated that the KB is applied. But the Build Number did not change. Hence the doubt.
Overall summary:
Final result: Passed
Exit code (Decimal): 0
Exit message: Passed
Start time: 2014-09-06 10:31:21
End time: 2014-09-06 10:55:49
Requested action: Patch
Instance SPNTSQLTRN overall summary:
Final result: Passed
Exit code (Decimal): 0
Exit message: Passed
Start time: 2014-09-06 10:48:08
End time: 2014-09-06 10:55:45
Requested action: Patch
Package properties:
Description: SQL Server Database Services 2008 R2
ProductName: SQL2008
Type: RTM
Version: 10
SPLevel: 2
KBArticle: KB2977319
KBArticleHyperlink: http://support.microsoft.com/?kbid=2977319
PatchType: QFE
AssociatedHotfixBuild: 0
Platform: x64
PatchLevel: 10.52.4321.0
ProductVersion: 10.52.4000.0
GDRReservedRange: 10.50.4001.0:10.50.4199.0;10.50.4200.0:10.50.4250.0
PackageName: SQLServer2008-KB2977319-x64.exe
Installation location: e:\ac2af22d88ee645b5b32b5c178\x64\setup\
Please inform if I need to apply the hotfix on CU12. Thanks in advance.
John SYes you must install Security update mentioned in KB 2977319 it is important for SQL Server to be patches with this security update. Without this it could allow an attacker to compromise your system and gain control over it.
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Articles -
Hi,
After applying this hotfix I encounter a FileNotFoundException when trying to access a Server Monitor (see below..).
Any advice most appreciated..
thanks, Tom
CF Version: 9,0,1,274733
Hot fix applied: http://www.adobe.com/support/security/bulletins/apsb11-04.html
We have a multi server environment: 5 instances (Admin x 1, Application x4).
Without hotfix:
================
I access the application Server Monitors via following urls:
http://myserver:8301/CFIDE/administrator/monitor/launch-monitor.cfm
http://myserver:8302/CFIDE/administrator/monitor/launch-monitor.cfm
http://myserver:8303/CFIDE/administrator/monitor/launch-monitor.cfm
http://myserver:8304/CFIDE/administrator/monitor/launch-monitor.cfm
If logged in I am taken to the server monitor without error.
If NOT logged in I am presented with the login screen, after submitting I am taken to the server monitor without error.
Note: The Server Monitors could never be launched via 'Launch Server Monitor' within the Administrator web interface for each application instance; instead the following message display 'The URL is not valid and cannot be loaded'.
After hotfix:
=============
I attempt to access the application Server Monitors via following urls:
http://myserver:8301/CFIDE/administrator/monitor/launch-monitor.cfm
http://myserver:8302/CFIDE/administrator/monitor/launch-monitor.cfm
http://myserver:8303/CFIDE/administrator/monitor/launch-monitor.cfm
http://myserver:8304/CFIDE/administrator/monitor/launch-monitor.cfm
If logged in I am taken to the server monitor without error.
***If NOT logged in I am presented with the login screen, after submitting I get the following error:
404
/CFIDE/administrator/CFIDE/administrator/monitor/launch-monitor.cfm?
java.io.FileNotFoundException: /CFIDE/administrator/CFIDE/administrator/monitor/launch-monitor.cfm?
at jrun.servlet.file.FileServlet.service(FileServlet.java:356)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
This appears to occur after I overlay the old CFIDE directory(s) with the new. As far as I can see there are not really any config(text) files I could have overwritten, but rather the cfm binaries have changed.
Questions
=========
The workaround is that I make sure I am logged in before attempting to access Server Monitors urls, BUT..
- How serious is this ?
- Is there a fix ?
I am reluctant to apply to Production environment...Hi Adam,
That's what I ended up doing. I do not know what ESAPIUtils does, so I just modified the return string using my own function:
<cfset esapiutils = createObject("java", "coldfusion.security.ESAPIUtils")>
<cffunction name="encodeForError" output="false">
<cfargument name="str" required="true">
<cfset var str2 = "">
<cfset var encodedStr = "" >
<cftry>
<cfset str2="#replace(str,"\","/","ALL")#">
<cfset encodedStr=esapiutils.encodeForHTML(str2)>
<cfcatch type="Any">
<cfoutput>
<admin:l10n id="error_verify" var="verify_err">
#esapiutils.encodeForHTML(CFCATCH.Message)#
#esapiutils.encodeForHTML(CFCATCH.Detail)#
</admin:l10n>
</cfoutput>
<cfthrow message="#verify_err#">
</cfcatch>
</cftry>
<cfreturn repairEncodeForError(encodedStr)>
</cffunction>
<!---added by Scott Jibben on 2011-02-19 to correct the display--->
<cffunction name="repairEncodeForError" output="no">
<cfargument name="str" type="string" required="yes" hint="output to clean">
<cfreturn ReplaceList(arguments.str, "<,>,&##x3d;,&##x27;,&##x2f;", "<,>,=,',/")>
</cffunction> -
Security Hotfix APSB10-04 Breaks our SOLR service
We installed APSB10-04 when we built our new CF9 web servers this past spring.
On our servers the Solr server has never worked. The service will just immediately stop every time it is started with no notification or logging.
Building a lab system a couple of weeks ago, I noticed that Solr stops working when applying the APSB10-04 Security Hotfix.
I presume the problem is with the IP number in the properties node that we are instructed in the hot fix documentation.
<Set name="Host"><SystemProperty naem="jetty.host" default="127.0.0.1"/></Set>
The local loopback ip of 127.0.0.1 does not go anywhere on these servers. But I also tried the boxes specific IP address to no good effect.
Commenting out the line, and the Solr service will start just fine. Added it with either 127.0.0.1 OR 10.104.106.39 and the Solr service will not start.
Any suggestions appreciated
IanI don't know how many times I looked at this, I even posted it here in the original post! But there is a typo in this line:
<Set name="Host"><SystemProperty naem="jetty.host" default="127.0.0.1"/></Set>
Fixing "<SystemProperty naem" to "<SystemProperty name" fixed the problem on this server straight away.
What was really missleading me was that both the development and production servers where suffering the same problem! But it was a completely different and distinct typo on the production server causing the problem there.
<Set name="port"><SystemProperty name="jetty.host" default="127.0.0.1"/></Set>
Fixing '<Set name="port"' to '<Set name="host"' fixed the production server!
Lesson Learned: Cut and Paste WHENEVER POSSIBLE! -
How to set buildID.xml and custom.properties in SDK
Hello,
I just completed a new build deployment of SAP ME5.2, because after I deployed the new version, I don't think I have set a
correct version number.Can you someone give me a sample how to set the buildID.xml and custom.properties? I am a new on the SAP ME5.2
The Base version is ME_Base_5.2.5.16.5_netweaver-71_Update.zip and
MEClient_Base_5.2.5.16.5_netweaver-71_Update.zip. the HB customzation
version is ME_xxxxxx_2.0.0.0.x_netweaver-71.
Within the sap note 1484551, you mentioned we need change the
SDKInstallDir/build/buildID.xml file, here is the context of the file:
buildID.xml -
<?xml version="1.0" encoding="UTF-8"?>
<buildID xmlns:xs="http://www.w3.org/2001/XMLSchema">
<customer>XXXXXX</customer>
<revision>1.0.0.0</revision>
<build>1</build>
</buildID>
buildID.xml -
1. how can we change the revision and build?
There is another file BuildToolDir/build/script/custom.properties, here
is the file context:
custom.properties----
This file contains build properties used to configure the build
system.
The name of the software vendor implementing the customizations.
vendor.name=xxxxxxxxx
Vendor build identifier. This value is used to uniquely identify
customizations built by a particular vendor for a particular customer
and base
application version.
This is also used in path locations and in naming certain build
artifacts, like the custom EJB module and the utility classes archive.
vendor.id=xxxxxxxxx
The installation of the J2EE engine installed in the development
environment.
ex. C:/usr/sap/CE1\J00
j2ee.instance.dir=J2EEInstanceDir
The web context path used to access the main web application. This
is used by the build to set the
context-root value in application.xml after an update has been
imported.
web.context.path=
The web context path used to access the production XML interface web
application. This is used by the build to set the
context-root value in application.xml after an update has been
imported.
xml.context.path=
The web context path to access resources from the web extension
application, like images and work instruction HTML files.
web-ext.context.path=web-ext
The target database vendor. Valid values are 'oracle' or 'sqlserver'.db.vendor=ORACLE
The JDBC driver configured for the application server.
db.drivername=VMJDBC
JDBC connection propertes for the WIP (Work In Process) database.
This is the primary application database.
db.wip.driverclassname=
db.wip.driver.url=
db.wip.host=
db.wip.port=
db.wip.sid=
db.wip.user=
db.wip.password=
JDBC connection propertes for the ODS (Open Data Store) database.
This is the offline reporting and archiving database.
db.ods.driverclassname=
db.ods.driver.url=
db.ods.host=
db.ods.port=
db.ods.sid=
db.ods.user=
db.ods.password=
Flag indicating whether to add DPMO NC codes to NC idat files when a
new update is imported. This value is initially
set by the installer according the the user selection.
dpmo.nc.codes=
The default locale used by the production system. The default locale
is the locale used to display locale
specific text and messages when the requested locale is not
available. This property does not need to
be set if the default locale is english.
default.locale=en
Used when running the build from Eclipse to locate the java compiler
used by the WebLogic EJB compiler.
jdk.home=C:/Program Files/Java/jdk1.5.0_20
Compiler debug mode. If set to 'true', debug symbols will be
compiled into the byte code.
compile.debug=true
Keystore alias
security.alias=xxxxx
Keystore password
security.storepass=ChangeIt
Key password
security.keypass=ChangeIt
Keystore type (jks=default,jceks,pkcs12)
security.storetype=jks
Optional source control build identifier that is to be displayed with
standard version information.
scs.build.ID=
Optional extended version information to be displayed with standard
version information.
ext.info=
custom.properties----
2. How can we change this here?
Regards,
Leon Lu
Edited by: Leon Lu on Aug 4, 2011 11:14 AM
Edited by: Leon Lu on Aug 4, 2011 11:21 AMHi,
I created one request with logo in the header an page in the footer etc. and called StyleSheet. After you can import this formats by each request.
You can do this in compound layout.
Regards,
Stefan -
File not found error with log4j.properties
Hi,
I'm writing a web service on weblogic 8.1 with weblogic workshop.I have to use log4j-1.2.7 supplied by client with my application.I cannot write ant script manually.Also I cannot change server start script or cannot put any command line argument when the server starts.
Now I require this logger in my EJB.I have kept log4j.properties in the same path where my EJB's are.But the final ear produced does not contain this log4j.properties and subsequently I get the error "log4j:ERROR Could not read configuration file [log4j.properties]."
Please help me to resolve this problem so that log4j.properties goes with the final .ear file and the ejb code finds the logger.
thanks,
pratimHello,
I am having a similar problem. Did you find a solution?
Thank you,
Melissa
"arunak" <[email protected]> wrote:
>
Hi Pratim,
I am also facing the same problem. can u please let me know whenever
u get the
solution for this.
Regards,
Arunak
Pratim <[email protected]> wrote:
Hi,
I'm writing a web service on weblogic 8.1 with weblogic workshop.Ihave
to use log4j-1.2.7 supplied by client with my application.I cannot write
ant script manually.Also I cannot change server start script or cannot
put any command line argument when the server starts.
Now I require this logger in my EJB.I have kept log4j.properties inthe
same path where my EJB's are.But the final ear produced does not contain
this log4j.properties and subsequently I get the error "log4j:ERROR
Could not read configuration file [log4j.properties]."
Please help me to resolve this problem so that log4j.properties goes
with the final .ear file and the ejb code finds the logger.
thanks,
pratim -
Cost involved in changing the code using log4j.properties to log4j.xml
i have finished my application, and it was done in such a way that logging is done using log4j but it was using log4j.properties file.
now i need to change it to log4j.xml. i need to do this at the earliest. so i need to know the cost involved in it?. do i need to change a lot on my app to read the log4j.xml?. In my app there is a function named getProperties, which actually reads the log4j.properties file.
this is the code of that function
public static Properties getProperties(String filename,String path) throws myException
//InputStream is = null;
FileInputStream is=null;
Properties props = new Properties();
//ClassLoader classLoader = ResourceUtil.class.getClassLoader();
//is = classLoader.getResourceAsStream(filename);
File catalinaHome = new File(System.getProperty("catalina.home"));
try {
is=new
FileInputStream(catalinaHome.getCanonicalFile()+path + filename);
} catch (IOException e) {
if(is == null)
String message = "Cannot locate property file " + filename + " in the classpath";
log.error(message);
throw new myException(message);
try
props.load(is);
catch (IOException e)
String message = "Error reading property file " + filename;
log.error(message);
throw new myException(message, e);
finally
try
is.close();
catch(Throwable t)
t.printStackTrace();
if(props.isEmpty())
String message = "No properties are defined in " + filename;
log.error(message);
throw new myException(message);
return props;
}and my initialize function is
public static void initialize()
Properties properties=null;
try {
String path="/properties/";
properties=ResourceUtil.getProperties("log4j.properties",path);
} catch (myException e2) {
e2.printStackTrace();
PropertyConfigurator.configure(properties);
}Message was edited by:
xema
Message was edited by:
xema
Message was edited by:
xema>
1. Restructure log4j.properties into log4j.xml.
thats done
2. Move log4j.xml into a directory that's in the
classpath.
actually i donot understand what does it mean to move in a directory thats in classpath means. i have to use logging in my webapplication running in tomcat. and my log4j.xml has to reside in catalina.home/properties/. My log4j.properties have been residing here and it had worked well woth the previous function. Now what i did is placed the log4j.xml under properties folder. Now tell me what modifications should i make in the above code.
3. Remove any code that explicitly configures log4j
(i.e. the initialize() method) because log4j will
configure itself from any properties file it finds in
the classpath, automatically, the first time it is
called.I prefer not remvoing this function as this function is being called in many of my classes... and we don't have time to edit all...
please help... and excuse me if i asked some blunders.!!! -
Where can I find the latest security hotfix for CF 9.0.2?
ZDNet announces there is a security hotfix for ColdFusion but provides no link to where I can read about it or download it. I go to the Adobe site and look for it by browsing and searching and can't find it. It's been hidden well.
Maybe the ZDNet announcement was made prior to Adobe updating their website? Or maybe I just can't find what is obvious for others.Adobe published it yesterday, you just have to know where to look: http://helpx.adobe.com/security.html is always updated with the latest from the Adobe Security team. More specifically you are looking for this: http://helpx.adobe.com/security/products/coldfusion/apsb14-23.html
Pete Freitag
Foundeo Inc. - Makers of HackMyCF -
Configuring directory path for fileappender in log4j.properties
I want to write log data to a file where the directory path of the file should be picked from a unix environmental variable. How can you configure this in log4j.properties?
log4j.rootLogger=INFO, A
# A is set to be a FileAppender.
log4j.appender.A=org.apache.log4j.FileAppender
# A uses PatternLayout.
log4j.appender.A.File=$UNIX_ENV_VARIABLE/A.log <= This is what I want. The dir path should be picked from some env path
log4j.appender.A.layout=org.apache.log4j.PatternLayout
log4j.appender.A.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%t] %-5p %c %x - %m%n
Or if this should be done in code, then please guide me on that.
Thanks in advanceHi,
i am facing one problem,
where today's log and yesterday log has log statements for today with same date.. but different data. any one pls help.
this is the properties i configured
# Logger for A messages
log4j.logger.A=debug, A_R1
log4j.appender.A_R1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A_R1.File=/var/opt/wmeaidata/app_data/log4j/logs/eai_a.log
log4j.appender.A_R1.MaxFileSize = 5MB
log4j.appender.A_R1.MaxBackupIndex = 3
log4j.appender.A_R1.layout=org.apache.log4j.PatternLayout
log4j.appender.A_R1.layout.ConversionPattern=%d{MMM dd, yyyy hh:mm:ss a}|%c-%X{host}|%m%n
Thanks
venkat -
Sun Application Server 8 and Log4j
In ...\sun\ApplicationServer\domains\domain1\lib\ext, you will find log4j.jar . This, being the extension directory will place log4j.jar high up in the classloader hierarchy.
Suppose I have a 2 EARs to be deployed, each containing a WAR and a EJB JAR. All use log4j and naturally, each will have either log4j.properties or log4j.xml . Say only file logging is configured and all log to different file each.
Now the problem: since lib/ext/log4j.jar is always the one to be used, the first log4j.properties or log4j.xml to be used will rule over the rest and all logging across WARs and EJBJARs will be to the SAME file!
In sun-web.xml, can configure <class-loader> element to not to delegate to parent classloaders (havent tried it). But this does not solve the problem because there seems to be no way to configure likewise for EJBJAR! So even if can place log4j.jar in WEB-INF/lib for WAR and able to log to WAR-specified destinaton file, all the EJBJARs across all EARs will still be using lib/ext/log4j.jar and log to SAME file!
So I have removed lib/ext/log4j.jar . Am I missing out something here? Any insights?
Thanks.I'm having the same problem....
But I do not have a log4j.jar file under lib/ext. In fact, that path is empty.
I posted my issue under a different forum (Java Enterprise System - General Discussion)
http://forum.java.sun.com/thread.jspa?threadID=5171613
thread is titled: JES5 and log4j inconsistencies from 2005Q4 with multiple web application
Any ideas? I'm offering 10 duke dollars for an answer on my original post.
Maybe you are looking for
-
Javax.mail.MessagingException
HI all, i am new to this area and currently i am working on email messaging application. in here i have set up an SMTP server and every thing, but finally it gives following exception javax.mail.SendFailedException: Sending failed; nested exception i
-
Hi All, When account assigned POs are being made, need a pop-up for entering cost centers & GL codes. This was coming earlier but now it is not. Please suggest. Regards Praveen
-
Can the trial version of Director 12 publish iOS app for in-house distribution?
Can the trial version of Director 12 publish iOS app for in-house distribution? What about the purchased version, any limitation on the type of distribution? I am getting the "Publishing to iOS appstore is not allowed for this movie. Click on "More I
-
Data integrator current version to be downloaded
Hello experts, I want to install Data integrator on my system. Can you please let me know which version of data integrator need to be downloaded. My OS is windows. I am downloading it from service marketplace. waiting for your reply. Appreciate your
-
Notifications in jmx to multiple clients
Hi. I have created some application, which have jmx embeded in it. The application broadcast notifications by this.sendNotification (my mbean class also extends StandardEmitterMBean mbean). All is going nice. Problem is, when I connect to my applicat