Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6039493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:22:36+00:00 2026-05-23T06:22:36+00:00

I have created a small program which logs text data to a file on

  • 0

I have created a small program which logs text data to a file on some action. I am accessing the remote system where the program is deployed by Putty. I have run the program using nohup so that it keeps running even if i shut down my shell. Till the time i am logged into the shell it continues to log the data. However, as soon as i exit my shell it stops writing to the log file. My program still continues to run just that it doesn’t write to the log file.
I am using Java 1.6 + slf4j+log4j for logging. The OS is Ubuntu.

Would appreciate some help.

EDIT:
my log4j.properties

log4j.rootLogger=DEBUG

log4j.appender.AdminFileAppender=org.apache.log4j.DailyRollingFileAppender
log4j.appender.AdminFileAppender.File=pdmLogs.log
log4j.appender.AdminFileAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.AdminFileAppender.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} -- %p %t %c - %m%n

log4j.appender.ReportFileAppender=org.apache.log4j.ConsoleAppender
log4j.appender.ReportFileAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.ReportFileAppender.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss,SSS} -- %p %t %c - %m%n

log4j.logger.com.xxx.xxx.yyy=ReportFileAppender,AdminFileAppender
log4j.logger.com.xxx.xxx.zzz=ReportFileAppender,AdminFileAppender

The command which I am running is:

nohup java -cp jarfile.jar com.xxx.xxx.yyy.Main &
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:22:36+00:00Added an answer on May 23, 2026 at 6:22 am

    Try changing your configuration to:

    log4j.rootLogger=DEBUG, AdminFileAppender
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writting a small graphics program using directx9 which imports some model files created
I have created a small Java application in which there is some code that
I have created a small application which opens,reads and creates Excel files. The app
I want to globalize my application. I have created a small form which asks
I have been working now for few days on a small C program which
I have written a game playing program for a competition, which relies on some
I have an design idea about the appearence of a small program , which
I have created a small flash CS4 project that has a few custom components
I have created a few small flash widgets that stream .mp3 audio from an
I've been working on a small program which gets a list of url's from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.