Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 23, 2012, 04:42:19 PM

Pages: [1]   Go Down
  Print  
Author Topic: Generating log files (path, permissions etc)  (Read 2244 times)
arvrama
Space Explorer
***
Offline Offline

Posts: 6


« on: March 19, 2008, 07:11:02 PM »

My web-app works perfectly well on my home-server. I am running on exactly the same setup as on the Lunarpages servers -- Lunar staff has confirmed that my site is hosted on Resin version 2.1.13, JDK 1.5 version, and MySQL version 5.0. Yet, the app does not have proper functionality on Lunar. So I turned on my logging functions (which also work perfectly on my home setup) but NO logs are generated on Lunar server.

I filed a ticket and did get a response -- asking me to create a log-file with 777 permissions in public_html directory. I complied and did this by creating an empty file call abcde.log, and setting permissions to 777 (with my ftp tool). I also set the path name in log4j.lcf to /public_html/abcde.log. Needless to say I rebuilt everything and deployed the new war. The app does run (not perfectly) but still no log-file (the original dummy file remains empty.)

What am I missing? Please help. As it is, I have no other way of debugging (since everything works perfectly on my setup.)
Logged
arvrama
Space Explorer
***
Offline Offline

Posts: 6


« Reply #1 on: March 22, 2008, 02:28:56 PM »

To answer my own question -- I pretty much gave up on creating logs the standard (log4j) way on lunarpages. The canned approach suggested by support did not work. Instead decided to write app logs to the database (got this idea from someone's blog -- he used a jdbc appender; i decided to jettison log4j altogether). At least this approach gives me a peek at my app log for the first time.

Thought I would post this just in case it helps someone else who comes along and encounters the same issue (in a shared server context).
Logged
jtbell
Newbie
*
Offline Offline

Posts: 2


« Reply #2 on: July 08, 2008, 07:22:30 PM »

I don't work for Lunarpages but here is a suggestion. The problem seems to me to be that you need to configure your logger to log into the real path of your application.  Normally you want also logs hidden in the WEB-INF folder. You can find out real path to WEB-INF by executing the following JSP file in your public_html folder.  Copy the file into the folder and then use the browser to access http://<yourdomain>/getRealPath.jsp.

The response should be something like:
The real path to your WEB-INF folder is /home/<domainlogin>/public_html/WEB-INF


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>getRealPath</title>
    </head>
    <body>
        The real path to your WEB-INF folder is
        <% out.println(application.getRealPath("/")+"WEB-INF"); %>
    </body>
</html>
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: