Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

wierd logging issue with my app

 
Ranch Hand
Posts: 644
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have two machines in office. One is PC and the other is desktop which I got recently.
I have installed same application (my java code) on both the machines. The servers installed are identical.
on my PC when I run my application locally , the log files get created correctly. But on my desktop with same settings the logs do not get created. I compared my classpath and other settings on both the machines for the same application. Nothing seems different. IS there any computer related settings that is rejecting the logs getting created for my application on the desktop. I am running out of any solution to this problem.
With my app, in the log4J config file , I just specify the location for logs directory. I checked the spelling and the path on the desktop and everything seems to be in order.

any pointers?

thanks
Trupti
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this related to log4j in particular?
 
trupti nigam
Ranch Hand
Posts: 644
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
NO.

But somehow the files are not getting created.
In log4j xml file I just set the location where logs needs to be stored.

here is my file.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "./dtds/log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

<!-- Declare fileAppender -->
<appender name="fileAppender" class="com.domain.util.TRFRollingFileAppender">
<param name="MaxFileSize" value="150MB"/>
<param name="file" value="C:/myapp225dev5/logs/adapter/{yyyy-MM-dd}-RouterName_Adapter-{hh-mm}.log"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{MM/dd|HH:mm:ss.SSS}|myApp|%-5p|%c{2}|%X{clientIP}|%m%n"/>
</layout>
</appender>
<!-- Declare AsyncAppender -->
<appender name="asycAppender" class="org.apache.log4j.AsyncAppender">
<param name="BufferSize" value="100000"/>
<param name="blocking" value="false"/>
<appender-ref ref="fileAppender"/>
<!-- <appender-ref ref="emailAppender"/> -->
</appender>


<logger name="com.xxx.yyy" additivity="false">
<level value="debug"/>
<appender-ref ref="asycAppender"/>
</logger>

<logger name="com.xxx.sss" additivity="false">
<level value="debug"/>
<appender-ref ref="asycAppender"/>
</logger>

<logger name="com.xxx.aaa" additivity="false">
<level value="debug"/>
<appender-ref ref="asycAppender"/>
</logger>

<root>
<priority value="DEBUG"/>
</root>

</log4j:configuration>

thanks
trupti
 
trupti nigam
Ranch Hand
Posts: 644
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI all,

I found the issue .
I downloaded the log4j jar and put it in my classpath on my desktop and now I see the logs are getting created. my only confusion is why it's working on my pc when no log4j.jar is in classpth on the pc?

For now the issue is resolved.

thanks
trupti
 
Curse your sudden but inevitable betrayal! And this tiny ad too!
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic