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 7967279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:39:13+00:00 2026-06-04T06:39:13+00:00

Our company’s webapps currently generate log messages (via System.out), which are later analyzed automatically

  • 0

Our company’s webapps currently generate log messages (via System.out), which are later analyzed automatically by other programs.

As a windows service, tomcat neatly produces logs to its “logs” directory, partitioned per day.

The problem is that in linux, everything goes to stdout, which may be redirected, is not split in daily files.

I tried an option at conf/context.xml: “<Context swallowOutput=true …”, but the output goes to catalina.out, unsplit, and commented with unconvenient lines.

In short: How to configure tomcat 6.0 in linux to handle System.out as it does as windows service.

Thanks in advance – Artejera

  • 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-06-04T06:39:14+00:00Added an answer on June 4, 2026 at 6:39 am

    As far as I know, Tomcat on *NIX and win32 behave the same way: stdout is redirected to a file that is not rotated. When installing Tomcat as a service, did you use the Tomcat installer (which installs procrun) or did you use some other procedure to set up your service?

    In your Linux environment, are you using bin/catalina.sh to launch Tomcat, or are you using jsvc or something else? Your options are different for each launch strategy.

    If you consider using jsvc to launch Tomcat, you can send SIGUSR1 to the jsvc process in order to have it re-open the log files. That way, you can have a cron job or something similar execute the following:

    $ mv $CATALINA_BASE/logs/catalina.out $CATALINA_BASE/logs/catalina-`date -I`.out
    $ kill -SIGUSR1 $CATALINA_PID
    

    That ought to re-open catalina.out with nothing in it and achieve the rotation you are looking for.

    If you have to stick with bin/catalina.sh, then you can hack the file so that it pipes stdout into a logging service like chronolog, etc. which can rotate the log files for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our company has a very large public Java API which is currently being released
Our company currently has a web site which is deployed in Windows 2000 OS,
Our company has a product which relies on local database to work (it allows
Our company is finally coming out of the dark ages and embracing Java 6.
Our company publishes our software product's documentation using a custom-built content management system using
Our company is currently using a simple trunk/release/hotfixes branching model and would like advice
Our company develop several software products, which reuse each others packages (we use Java).
Our company currently implementing TSA (Time Stamp Authority) service. And now we are searching
Our company currently has seven dedicated SQL Server 2008 servers each running an average
Our company is currently running a asp.net Webforms 3.5 website as the default website

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.