Page 1 of 1

Log file not creating

PostPosted: Thu Apr 18, 2024 6:16 pm
by qhill
I am running 2022.3.4.3746_LTS. I've attached my log config file.

servoy_log.txt is not getting created. Any thoughts as to what might be wrong with the config?

Re: Log file not creating

PostPosted: Thu Apr 18, 2024 7:39 pm
by robert.edelmann
Sorry, the file looks not like valid xml to me (and to my XML-Minimizer).
If that's the file you tried to use to configure the log, then that is the problem.

I fixed the empty lines and some "-" in wrong places, it should look like this, and that's similar to my config:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="INFO" debug="false">
      <Console target="SYSTEM_OUT" name="stdout">
         <PatternLayout pattern="%d %p [%t] %c - %m%n"/>
      <SlidingWindow name="configservlet" dateTimeFormat="yyyy-MM-dd HH:mm" windowSize="1000"/>
      <RollingFile name="file" append="true" immediateFlush="true" filePattern="${web:attr.servoy.application_server.dir}/" fileName="${web:attr.servoy.application_server.dir}/servoy_log.txt">
            <SizeBasedTriggeringPolicy size="10MB"/>
         <PatternLayout pattern="%d %p [%t] %c - %m [$${servoy:clientid:-} $${servoy:solution:-}]%n"/>
      <Async name="asyncfile">
         <AppenderRef ref="file"/>
      <Logger name="com.servoy.j2db.util.Debug" level="WARN"/>
      <Logger name="com.servoy.j2db.dataprocessing.editedRecords" level="WARN"/>
      <Logger name="com.servoy.j2db.server.persistence.Server" level="WARN"/>
      <Logger name="com.servoy.j2db.persistence.XMLInMemoryImportHandlerVersions11AndHigher" level="WARN"/>
      <Logger name="com.servoy.j2db.persistence.XMLExporter" level="WARN"/>
      <Logger name="com.servoy.j2db.server" level="WARN"/>
      <Logger name="com.servoy.j2db.server.main.WebServer" level="WARN"/>
      <Logger name="com.servoy.j2db.datasource" level="WARN"/>
      <Logger name="com.servoy.j2db.datasource.ClientManager" level="WARN"/>
      <Logger name="org.sablo" level="WARN"/>
      <Logger name="" level="WARN"/>
      <Logger name="org.sablo.websocket" level="WARN"/>
      <Logger name="org.sablo.IndexPageEnhancer" level="ERROR"/>
      <Logger name="" level="WARN"/>
      <Logger name="org.apache.wicket" level="WARN"/>
      <Logger name="" level="ERROR"/>
      <Root level="WARN">
         <AppenderRef ref="asyncfile"/>
         <AppenderRef ref="configservlet"/>
         <!-- <AppenderRef ref="stdout" /> -->


Re: Log file not creating

PostPosted: Thu Apr 18, 2024 11:55 pm
by qhill
My file didn't paste in well. My file is the same as yours.

Re: Log file not creating

PostPosted: Fri Apr 19, 2024 1:43 am
by robert.edelmann
The log-file gets created in the home-directory ("${web:attr.servoy.application_server.dir}") that is set in the war export or in your tomcat-settings.

Are you sure that you are looking in the correct directory?

The file should be in the same directory as the servoy-properties, which is listed in the Servoy-Admin-Page under "Server Information"

Re: Log file not creating

PostPosted: Fri Apr 19, 2024 10:07 pm
by qhill
I have the file but no logs. I searched the entire server.

Re: Log file not creating

PostPosted: Mon Apr 22, 2024 1:24 am
by robert.edelmann
Do you have any other entries in the systemlog (on Unix style systems) or the tomcat-logs?

If I shutdown my logging-server I get errors in syslog:

2024-04-22T01:10:19.633778+02:00 BPC3Test tomcat9[90637]: ERROR StatusConsoleListener TcpSocketManager (TCP: caught exception and will continue:
2024-04-22T01:10:19.633853+02:00 BPC3Test tomcat9[90637]: Unable to create socket for at port 12201

I would hope you get more insights into the problem. (do you get logs if you don't supply any log4j.xml on war-export?)