Jump to content

[Solved] TomCat log access


fjmduran

Recommended Posts

Hello, I have read in this forum that read log file of tomcat server is not possible. I have desployed a Java servlet application but its response is not successfull. I have tested in my tomcat server and it runs successfully. I use java.util.logging.Logger to write errors, how could I to read the problem of my java application in Tommy server?

My Java application try to read postgresql database in Tommy server (tommy.heliohost.org:5432/fjmduran_cestacompra)

 

User name:fjmduran

Server name: Tommy

http://fjmduran.heliohost.org/TestHelioHost/

 

 

Thanks,

Link to comment
Share on other sites

The general advice here is to have the application generate its own log somewhere where you can access it (such as in your home folder). If you ever do need the tomcat logs, you can ask for them Krydos can get the relevant parts for you. We can't provide the whole log because the log contains sensitive information for every java application running on the server.

Link to comment
Share on other sites

Your home folder path should be shown in cPanel on the right side. Create a folder inside your home folder (e.g. /home/username/javalog) and grant that folder 756 or 757 permissions. Then add code to your java app that generates logs and saves them in there. Tomcat apps run as another user, so you have to give "other users" (the third number) the write attribute in order for it to save logs in there.

 

Do NOT use the home folder itself as the log path, it won't have permission to save directly in the home folder, and changing the permissions will break your account.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...