Can frequently repeated log messages be dealt with in a better way?

I am troubleshooting new remotes and trying to use the log to monitor activities in real time. One message that is getting in the way is the pclone time parse error. I understand the rclone is not the source of the problem and that pcloud is not giving a compliant time format.

The issue is that this error is logged every other line and it really gets in the way. I am trying to look for useful messages about chunks to understand what is happening and when with my remote and all I see are endless time parsing errors.

I do not think pcloud will fix there error but can rclone deal with errors like this in a more intelligent way?

I have seen logs where it says something like "the previous log entry was repeated 715 times. This conveys the message but also prevents the log from becoming spammed by usefulness information which get in the way of using the log as a tool to troubleshoot.

Another option would be giving the user some sort of configuration to suppress troublesome log entries like this.

Here is another user asking about this issue:

Tough to tell as we don't know your OS or any command you are running or any log information. If you can hit the things in the template, that helps us answer you.

each time i run rclone, this is that i do

my script reads the log file line by line.
decides if that line is important and write that line to a new file.
if the line is not important, i do not write it to the new file.

I don't get an log message when I use pcloud.

Are you using the latest rclone?

You can use grep -v what-you-dont-want

Ie. less +F rclone.log | grep -v what-you-dont-want should work

Sorry for not posting more information, the issue is the exact same message as the previous post I linked to:

Here is from the other user from 2018:

DEBUG: Couldn't parse Date: from server p-ams2.pcloud.com: "Tue, 06 Feb 2018 13:58:40 +0000": parsing time "Tue, 06 Feb 2018 13:58:40  +0000" as "Mon jan _2 15:04:05 2006": cannot parse ", 06 Feb 2018 13:58:40 +0000" as " "

Here is from my log:

Couldn't parse Date: from server c216.pcloud.com: "Wed, 04 Nov 2020 06:25:08 +0000": parsing time "Wed, 04 Nov 2020 06:25:08 +0000" as "Mon Jan _2 15:04:05 2006": cannot parse ", 04 Nov 2020 06:25:08 +0000" as " "

it's the same only 2 years later.

In the previous post, you mentioned:

rclone parses the `Date:` in incoming requests to check that your computer’s date is correct.

If it can’t parse it, then it is no big deal.

Strictly speaking that format “Tue, 06 Feb 2018 13:58:40 +0000” isn’t valid according to the [HTTP/1.1 RFC ](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3) which is why the go runtime doesn’t parse it. If they were to replace the “+0000” with “GMT” then it would be valid.

I wrote to pcloud before to suggest they change it but never heard back!

Since I have always gotten this message with pCloud though several version over a year and irregardless of platform (Windows, Linux, Android etc)., when I saw the previous post I thought this was common with pCloud.

As you mentioned to the other user, it is only a debug message so I wasn't too concerned about it however it does get in the way of using the logs effectively.

I am using two version at the moment:

rclone v1.50.2

  • os/arch: linux/amd64
  • go version: go1.13.6

rclone v1.53.0-DEV

  • os/arch: android/arm
  • go version go 1.13.4

Thanks for this suggestion, this might just be what I need. I am using tail rclone.log -f to view the log in real time. Can I combine tail with less and grep? I have been playing with the syntax but can't get it quite right.

You can keep using tail if you want, just pipe that to grep instead.

less +F file.log works more or less (no phun intended) like tail.

Is there any advantage to using less? I use tail because that was the only command I was aware of. Thanks for the suggestion!

Don't think you will notice any difference "following" files, not really sure. Tail is more old school. You can also use less to view a file page for page.

It looks like less +F give me one page of log at a time then I need to press a key to go to the next page, is this correct?

With tail -f it streams the log line by line which is what I need for real-time monitoring. I tried piping it to grep but grep breaks the -f.

Is it possible to have less give me a line by line stream as well?

Thanks for that.

Can you see if you can reproduce with the latest beta - and if you can please make a new issue on github with instructions on how to reproduce and I'll fix :slight_smile:

less +F file makes less behave like tail -f. Just google it if you're having a hard time.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.