Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

LOG4J

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
Using log4j log messages should be sent to a file. consider i am writing some ten messages in the file , when a 11th messages comes it should replace the 1st message in the that file than remaining 9 messages(from 2 to 10) should not be deleted. Also for the 11th message it should not create a new file(Rolling file appender). I have written the code for sending the log messages to a file but don't know how to implement that file requirement. Please help me to solve this issue
 
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Govardhan,
Welcome to the Ranch.

I do not think that is possible, only by tweaking log4j properties. You might have to do the cleanup stuff with some java file i/o code.
We have a dedicated forum where log4j is usually discussed. I will move this thread there for you.
 
Govardhan Balaji
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply. Will you provide the link when you move this thread.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The posts are internally linked to be redirected. Such posts will carry this icon
Anyway, you need not worry about the link. Clicking on the original post will take you automatically to the new place.
As you can see, your post is now in the "Other Open Source Projects" forum.
 
Govardhan Balaji
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya after posting the reply only i have noticed that. Sorry i have created a new topic,Can you delete that new topic
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Can you delete that new topic


Removed.
 
Govardhan Balaji
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking at the requirement, it's surely going to confuse those who will be using the logs to identify any issues. Why do you want it that way?
 
Govardhan Balaji
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This was the requirement given to me. What to do?.
 
A sonic boom would certainly ruin a giant souffle. But this tiny ad would protect it:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!