• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

wierd logging issue with my app

 
Ranch Hand
Posts: 647
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: 647
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: 647
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
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic