Log file not creating

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Log file not creating

Postby qhill » Thu Apr 18, 2024 6:16 pm

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?
Attachments
log4j2.txt
(2.07 KiB) Downloaded 128 times
qhill
 
Posts: 7
Joined: Wed Jan 08, 2014 9:07 pm

Re: Log file not creating

Postby robert.edelmann » Thu Apr 18, 2024 7:39 pm

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>
mit freundlichen Grüßen
Robert Stefan Edelmann
User avatar
robert.edelmann
 
Posts: 103
Joined: Wed Aug 14, 2013 6:12 pm

Re: Log file not creating

Postby qhill » Thu Apr 18, 2024 11:55 pm

My file didn't paste in well. My file is the same as yours.
qhill
 
Posts: 7
Joined: Wed Jan 08, 2014 9:07 pm

Re: Log file not creating

Postby robert.edelmann » Fri Apr 19, 2024 1:43 am

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"
mit freundlichen Grüßen
Robert Stefan Edelmann
User avatar
robert.edelmann
 
Posts: 103
Joined: Wed Aug 14, 2013 6:12 pm

Re: Log file not creating

Postby qhill » Fri Apr 19, 2024 10:07 pm

I have the servoy.properties file but no logs. I searched the entire server.
qhill
 
Posts: 7
Joined: Wed Jan 08, 2014 9:07 pm

Re: Log file not creating

Postby robert.edelmann » Mon Apr 22, 2024 1:24 am

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?)
mit freundlichen Grüßen
Robert Stefan Edelmann
User avatar
robert.edelmann
 
Posts: 103
Joined: Wed Aug 14, 2013 6:12 pm


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 6 guests

cron