Reprocess old statistics logs is not working

Describe the issue or problem

I’m trying to process logs form a former version of OJS, following the steps described in the documentation, but i is not working, the log says:

[Error] El archivo usage_events_20250621.log está en un formato de registro antiguo que no puede ser procesado, así que se devolverá al directorio de preparación (‘stage directory’)

In english it would be:
[Error] The file usage_events_20250621.log is in old log file format that cannot be processed and will thus be moved back to the stage directory.

Steps I took leading up to the issue

  1. I copy the old log files, from 3.3, into the usagestats/archive folder
  2. Through SSH I run php lib/pkp/tools/convertUsageStatsLogFile.php
  3. It works, a new log file with a Json format is created and the former one is renamed adding a _old suffix
  4. I move those brand new log files to stage folder
  5. I run php lib/pkp/tools/reprocessUsageStatsMonth.php 202506 (cause I’m beginning with that month statistics)
  6. Nothing happens, en the scheduledTaskLogs i see the error I mentioned up here:
    [Error] El archivo usage_events_20250621.log está en un formato de registro antiguo que no puede ser procesado, así que se devolverá al directorio de preparación (‘stage directory’)

What application are you using?
For example, OJS 3.3.0-4

Additional information

I have recently updating OJS from 3.3 to 3.4.0.9, statistcs are working fine since I updated but I’m trying to add the two former years statistics.

I tried the same steps in a development clean installations, in another server, and it worked.

I have checked if the base url was the same and it is.

Thank’s

Kike

No ideas?

Anyone?

Thank’s

Hi @kikeconk, I believe the format of the usage log files changed between 3.3 and 3.4, but the log files in your 3.4 installation should have been updated to the new format during the upgrade process. Did you remove your log files when you upgraded, or is there another reason you are using the files from 3.3 instead of 3.4?

Hi, thank’s for yout answer.

In 3.3 I had a problem with Statistics, the logs were generated but not processed, so in fact I had no metrics in 3.3.

I tried hard to solve that, but I wasn’t able to.

So, I’ve updated OJS to 3.4 and, same server same everything, metrics begin to run properly.

The one thing left is rescue the old 3.3 statistics logs and incorporate them into the updated journal.

I follow the instructions for reprocess old format statistics I found in IJS documentation:

1- First convert statistics into new format, it (aparently) works.

2- Process those statistics through stage folder, it shows an error as they wer in some old format.

That’s the story, I don’t know what else try. I installed a clean OJS 4, in other server and the process works, I don’t know what’s going on.

Thank’s

Kike

1 Like

Experiencing the same issue. No statistics in ojs 3.3, upgraded to 3.5, tried to use convertUsageStatsLogFile.php and not working

1 Like