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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:35:52+00:00 2026-06-04T03:35:52+00:00

I have Linux server on which I run tomcat with my axis2 webservice. I

  • 0

I have Linux server on which I run tomcat with my axis2 webservice.

I use the following for Log4j:
xml configuration file, which is located in the same directory as my webservice java file.

XML:

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

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

    <!-- Appenders -->
    <appender name="roll" class="org.apache.log4j.rolling.RollingFileAppender">
        <param name="file" value="~//..//tmp//CookTalesLog.log" />
                <param name="append" value="true" />
                <param name="encoding" value="UTF-8" />
                <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
                        <!-- The file to roll to, this is a fairly intelligent parameter, if the file
                        ends in .gz, it gzips it, based on the date stamp it rolls at that time, 
                        default is yyyy-MM-dd, (rolls at midnight)
                        See: http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/rolling/TimeBasedRollingPolicy.html -->
                        <param name="FileNamePattern" value="CookTalesLog.%d.log.gz" />
                </rollingPolicy>

                <layout class="org.apache.log4j.PatternLayout">
                        <!-- The log message pattern -->
                        <param name="ConversionPattern" value="%5p %d{ISO8601} [%t][%x] %c - %m%n" />
                </layout>
    </appender>

    <root>
        <priority value="debug" />
        <appender-ref ref="roll" />
    </root>

</log4j:configuration>

In the java code:
I tried to use each of the following lines

private static final Logger sLogObj = Logger.getLogger( ICDBWebService.class );

private static final Log sLogObj = LogFactory.getLog(ICDBWebService.class);

also used:

static
{
    DOMConfigurator.configure( "log4j.xml" );
}

For logging:

    sLogObj.debug( "Login: email=" + email + " pwd= " + password );

Log file is not created….

Any ideas what am I doing wrong?

  • 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-04T03:35:54+00:00Added an answer on June 4, 2026 at 3:35 am

    The double ‘//’ may be a problem.

    You can enable the internal debug output of Log4J by passing -Dlog4j.debug=true to the JVM or if running on Tomcatexport TOMCAT_OPTS="-Dlog4j.debug=true to see what’s happening inside Log4J.

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

Sidebar

Related Questions

I have a FTP server which I use for Linux repository for RPM packages.
I have about 5 different heterogenous linux dedicated server which can run Java applications.
I have written a server daemon (Linux, Ubuntu) which communicates with PHP as frontend
I have requirement like this: On one server(linux) I need to run 2 instances
I'm trying to install virtual-python on linux server which I don't have root access.
We have around 250 identical linux server which runs a business critical web application
Here's my question. Right now I have a Linux server application (written using C++
How to send messages from php to node.js? I have a linux server running
I have a server that is running Ubuntu Linux Server Edition. I once had
I have setup a git repository in a linux server, and installed the latest

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.