I am using traccar 5.0 on a docker installation. with the following volumes
/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/volumes/traccar/logs /opt/traccar/logs
/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/volumes/traccar/conf/traccar.xml /opt/traccar/conf/traccar.xml
and the following configuration
<properties>
<entry key='config.default'>./conf/default.xml</entry>
<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://xxxxxx:yyyy/traccar?serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
<entry key='database.user'>xxxxxx</entry>
<entry key='database.password'>yyyyyyy</entry>
<entry key='osmand.port'>5055</entry>
<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
<entry key='geocoder.url'>https://eu1.locationiq.com/v1/reverse.php</entry>
<entry key='geocoder.key'>pppppppppppppppppp</entry>
<entry key='geocoder.onRequest'>false</entry>
<entry key='geocoder.ignorePositions'>false</entry>
<entry key='logger.enable'>true</entry>
<entry key='logger.level'>info</entry>
<entry key='logger.file'>./logs/tracker-server.log</entry>
<entry key='logger.rotate'>true</entry>
<entry key='logger.console'>false</entry>
<entry key='event.enable'>false</entry>
<entry key='server.timeout'>180</entry>
<entry key='web.healthCheck'>false</entry>
</properties>
Everything work excellent with the application. The only minor issue that I have is that the logs are exported in the a certain log file but cannot be seen from the "docker log" commands that displays the log for a specific container. The log displayed is empty.
If I change <entry key='logger.console'>false</entry>
to true the logs can be seen from the above but not from the actual log file. So, how can I enable both i.e this docker logs and file log
Currently you can either enable file or console. You can't have both.
I am using traccar 5.0 on a docker installation. with the following volumes
and the following configuration
<properties> <entry key='config.default'>./conf/default.xml</entry> <entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry> <entry key='database.url'>jdbc:mysql://xxxxxx:yyyy/traccar?serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry> <entry key='database.user'>xxxxxx</entry> <entry key='database.password'>yyyyyyy</entry> <entry key='osmand.port'>5055</entry> <entry key='geocoder.enable'>true</entry> <entry key='geocoder.type'>nominatim</entry> <entry key='geocoder.url'>https://eu1.locationiq.com/v1/reverse.php</entry> <entry key='geocoder.key'>pppppppppppppppppp</entry> <entry key='geocoder.onRequest'>false</entry> <entry key='geocoder.ignorePositions'>false</entry> <entry key='logger.enable'>true</entry> <entry key='logger.level'>info</entry> <entry key='logger.file'>./logs/tracker-server.log</entry> <entry key='logger.rotate'>true</entry> <entry key='logger.console'>false</entry> <entry key='event.enable'>false</entry> <entry key='server.timeout'>180</entry> <entry key='web.healthCheck'>false</entry> </properties>
Everything work excellent with the application. The only minor issue that I have is that the logs are exported in the a certain log file but cannot be seen from the "docker log" commands that displays the log for a specific container. The log displayed is empty.
If I change
<entry key='logger.console'>false</entry>
to true the logs can be seen from the above but not from the actual log file. So, how can I enable both i.e this docker logs and file log