Location of logfiles for a Tomcat deployment

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

Location of logfiles for a Tomcat deployment

Postby jdbruijn » Wed Oct 11, 2017 4:00 pm

In the old setup where we used the integrated tomcat server, I could find the servoy_log.txt file in the application_server folder. But now we are using WAR deployments to a Tomcat server and I can no longer find the log files.
When I look at the admin page I find the following line in the log4j settings:
log4j.appender.file.File=%%servoy_app_server_dir%%\servoy_log.txt
Where is this folder %%servoy_app_server_dir%% in this setup? I have looked everywhere in the tomcat folder. And also looked for .servoy files in the user folders. But I cannot find it.
Jos de Bruijn
Welcome CCS
Servoy Certified Developer
Image
jdbruijn
 
Posts: 450
Joined: Sun Apr 11, 2010 6:34 pm

Re: Location of logfiles for a Tomcat deployment

Postby Ruben79 » Thu Oct 12, 2017 9:33 am

Try looking at the Server information in servoy-admin. There is a 'Settings file for this server' that shows you the path used for that deployment. That path should also contain the servoy_log.txt.
Ruben de Jong
Stb Software Development
SAN Partner

Stb Software Development - http://www.stb.nl
User avatar
Ruben79
 
Posts: 73
Joined: Wed Apr 18, 2007 12:43 pm

Re: Location of logfiles for a Tomcat deployment

Postby jdbruijn » Thu Oct 12, 2017 10:40 am

Ruben79 wrote:Try looking at the Server information in servoy-admin. There is a 'Settings file for this server' that shows you the path used for that deployment. That path should also contain the servoy_log.txt.

Hi Ruben,
I found the settings file in the admin page. There it says: C:\Windows\system32\config\systemprofile\.servoy\....
However I cannot see that .servoy folder (and I can see all hidden files)
I have searched the entire server for this folder, and I have not found it there.
Jos de Bruijn
Welcome CCS
Servoy Certified Developer
Image
jdbruijn
 
Posts: 450
Joined: Sun Apr 11, 2010 6:34 pm

Re: Location of logfiles for a Tomcat deployment

Postby Andrei Costescu » Thu Oct 12, 2017 4:45 pm

That is probably the home dir. of the user that runs Tomcat as a service. It should be there...
If you want to change it (directory used by Servoy to store the properties file and the log file when deployed as war) you can do one of the following:

  • when exporting via. war export wizard you can configure that in "Deploy configuration" page - "User home directory" field.
  • if you are using a pre-made servoy.properties file add something like "servoy.user.home=C:\Servoy" in it.
  • when exporting war using command-line exporter set the "-userHomeDirectory C:\Servoy" arg.
  • if you have access to tomcat config files you can add the SERVOY_USER_HOME property to tomcat vm args; that will affect all deployments on that tomcat. For example: -DSERVOY_USER_HOME=C:\Servoy
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 907
Joined: Tue Jun 26, 2007 3:14 pm

Re: Location of logfiles for a Tomcat deployment

Postby jdbruijn » Thu Oct 12, 2017 4:55 pm

Andrei Costescu wrote:That is probably the home dir. of the user that runs Tomcat as a service. It should be there...

... But it is not there. At least I cannot find this .servoy folder anywhere on the server ??
Tomcat runs as 'local system', so I guess it should be in C:\Windows\system32\config\systemprofile\.servoy\ but no .servoy folder there. And also not in any of the user folders under c:\Users. And even doing a system wide search for this folder it does not show up.

If you want to change it (directory used by Servoy to store the properties file and the log file when deployed as war) you can do one of the following:

  • when exporting via. war export wizard you can configure that in "Deploy configuration" page - "User home directory" field.
  • if you are using a pre-made servoy.properties file add something like "servoy.user.home=C:\Servoy" in it.
  • when exporting war using command-line exporter set the "-userHomeDirectory C:\Servoy" arg.
  • if you have access to tomcat config files you can add the SERVOY_USER_HOME property to tomcat vm args; that will affect all deployments on that tomcat. For example: -DSERVOY_USER_HOME=C:\Servoy

I will make a note of this, to change it the next time we do a WAR update.
Jos de Bruijn
Welcome CCS
Servoy Certified Developer
Image
jdbruijn
 
Posts: 450
Joined: Sun Apr 11, 2010 6:34 pm

Re: Location of logfiles for a Tomcat deployment

Postby ROCLASI » Fri Oct 13, 2017 6:31 pm

Hi Jos,

On Windows you simply create a directory you want to use as the homefolder. Then launch Tomcat8w.exe (if you use version 8 ) and add
-DSERVOY_USER_HOME=C:\Path\To\My\Special\Tomcat\Directory under the Java Options (Java Tab)
Restart Tomcat and you are in business.

Hope this helps.
Robert Ivens
ROCLASI Software Solutions / JBS Group, Partner
SAN Developer / Servoy Valued Professional / Servoy Certified Developer
Twitter: @roclasi / @servoyforge
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5217
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Location of logfiles for a Tomcat deployment

Postby jdbruijn » Sat Oct 14, 2017 1:08 am

ROCLASI wrote:On Windows you simply create a directory you want to use as the homefolder. Then launch Tomcat8w.exe (if you use version 8 ) and add
-DSERVOY_USER_HOME=C:\Path\To\My\Special\Tomcat\Directory under the Java Options (Java Tab)
Restart Tomcat and you are in business.

I will plan this in the next scheduled downtime. But I still find it strange that I cannot find any log files anywhere on the server at the moment. :?:
Jos de Bruijn
Welcome CCS
Servoy Certified Developer
Image
jdbruijn
 
Posts: 450
Joined: Sun Apr 11, 2010 6:34 pm


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 1 guest

cron