You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, sorry for not providing a reprex. But this issue occurs at random (to my understanding) so I can't create a reprex. Here'e the issue:
After I finally understood that log_make in drake_config() needs an existing file, I really like this feature. The logs are great as I can easily find warnings and errors even if the plan runs in parallel.
Now I want to write a small function which reads the log file and extracts the lines containing warnings and errors. There are two issues which make this not super straight forward:
If error or warning messages contain \n, these messages are split across severeal lines in the log. This is not a big problem since I can append all lines with an incorrect number of | to the previous line. The risk of missing some message is low.
However, it would be great if line endings of the log file would be different from those in the logged warning and error messages. Not sure if this is possible, though.
This is the real issue: Sometimes - to my understanding at random - some lines in the log file get mixed up like this:
There is always a blank line, and the next line contains two lines but the first few characters are missing.
Since the log stems from an r_make() run in parallel, I assume this somehow occurs when different workers try to write to the log simultaneously. But that's just a guess.
Reproducible example
Post a minimal reproducible example so the maintainer can troubleshoot the problems you identify. A reproducible example is:
Runnable: post enough R code and data so any onlooker can create the error on their own computer.
Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
Prework
Description
First, sorry for not providing a reprex. But this issue occurs at random (to my understanding) so I can't create a reprex. Here'e the issue:
After I finally understood that
log_make
indrake_config()
needs an existing file, I really like this feature. The logs are great as I can easily find warnings and errors even if the plan runs in parallel.Now I want to write a small function which reads the log file and extracts the lines containing warnings and errors. There are two issues which make this not super straight forward:
If error or warning messages contain
\n
, these messages are split across severeal lines in the log. This is not a big problem since I can append all lines with an incorrect number of|
to the previous line. The risk of missing some message is low.However, it would be great if line endings of the log file would be different from those in the logged warning and error messages. Not sure if this is possible, though.
This is the real issue: Sometimes - to my understanding at random - some lines in the log file get mixed up like this:
There is always a blank line, and the next line contains two lines but the first few characters are missing.
Since the log stems from an
r_make()
run in parallel, I assume this somehow occurs when different workers try to write to the log simultaneously. But that's just a guess.Reproducible example
As this issue occurs at random, I could not create a reprex. Here's at least my
drake_config()
:Expected result
The lines in the log should not be mixed up.
The text was updated successfully, but these errors were encountered: