No logs after Clear History procedure?

qlexa year ago

Hi,
we followed the "Clear History" suggestions to improve performance of Traccar. Since we don't need historical locations it made sense.
However, noticed now that it's empty in /logs folder. How to best debug the situation? I was recently restarting traccar service as I was changing something (adding h02 protocol to traccar.xml config file) as only osmand protocol was mentioned there and we use both types of devices), and can't debug if things are running smooth.

Anton Tananaeva year ago

Clearing history has absolutely nothing to do with your problem. If you changed config and Traccar doesn't start and no logs, there's something wrong with your config. Make sure it's a valid XML file.

Track-tracea year ago

It happened to me sometimes that traccar.xml or default.xml was the cause that traccar server could not start.

It was because i edited these files through a browser with webmin which had a bug. Since then i use Notepad ++ to edit xml files.
There are tools (also online) to verify if your xml files are valid.
But what i did since then is backup the config files before every edit.

A simple way is just to download the config files from the traccar version that Anton has put online. Then just use these files and first only change the database credentials to see if the server starts. Actually that worked for me.

qlexa year ago

Thanks for pointers. Both files are valid - checked them. Service runs corrcly but outputs no log. Maybe just coincidence but before the clean history procedure we had logs (actually they’re wree too big). The only thing I can’t confirm is that I run manually the script at once, if It did finish. It was fuzzing about using SQL password in plain text as it was iterating the database, and I closed the terminal accidentally.

Anton Tananaeva year ago

Service runs corrcly but outputs no log

That's not possible unless you explicitly disabled logs. Are you sure you didn't just remove log files?

qlexa year ago

I might have removed the file. Isn’t not created automatically then?

Track-tracea year ago

You might have removed it when the server is running. Then restart the server and logfile should be created.

Anton Tananaeva year ago

If you removed it, you have to restart the server to create a new file.

qlexa year ago

Service Traccar restart didn’t Create th3 file. So stop and start?

Anton Tananaeva year ago

If it didn't create, something is broken. Are you sure you restarted the service? Can you please provide some evidence, like command line output.

qlexa year ago

I restarted the server when i first wrote:
Screenshot of service status

Anton Tananaeva year ago

And you refuse to do it again?

qlexa year ago
qlexa year ago

I think i might have found the reason.

<entry key='logger.level'>severe</entry>

Could that be it ?
But strangely, I haven't been changing this.

Your problem is definitely with the xml file. Try replacing it with the default. Adding your login details to the bd obviously you use.
I have a script in python to perform the cleanup to the bd with sending confirmation of success or failure to my email.