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">
   <Appenders>
      <Console target="SYSTEM_OUT" name="stdout">
         <PatternLayout pattern="%d %p [%t] %c - %m%n"/>
      </Console>
      <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}/servoy_log-%i.txt.zip" fileName="${web:attr.servoy.application_server.dir}/servoy_log.txt">
         <Policies>
            <SizeBasedTriggeringPolicy size="10MB"/>
         </Policies>
         <PatternLayout pattern="%d %p [%t] %c - %m [$${servoy:clientid:-} $${servoy:solution:-}]%n"/>
      </RollingFile>
      <Async name="asyncfile">
         <AppenderRef ref="file"/>
      </Async>
   </Appenders>
   <Loggers>
      <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="org.sablo.specification.property" level="WARN"/>
      <Logger name="org.sablo.websocket" level="WARN"/>
      <Logger name="org.sablo.IndexPageEnhancer" level="ERROR"/>
      <Logger name="com.servoy.j2db.server.ngclient.property.types" level="WARN"/>
      <Logger name="org.apache.wicket" level="WARN"/>
      <Logger name="org.apache.wicket.request.target.component.listener.BehaviorRequestTarget" level="ERROR"/>
      <Root level="WARN">
         <AppenderRef ref="asyncfile"/>
         <AppenderRef ref="configservlet"/>
         <!-- <AppenderRef ref="stdout" /> -->

      </Root>
   </Loggers>
</Configuration>

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 servoy.properties 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:192.168.1.202:12201) caught exception and will continue:
2024-04-22T01:10:19.633853+02:00 BPC3Test tomcat9[90637]: java.io.IOException: Unable to create socket for 192.168.1.202 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?)