Closed schmalte04 closed 3 years ago
Can you please share your sessionInfo()
? Mostly interested in the local
settings.
That the locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8+
version 4.0.0 (2020-04-24) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Mojave 10.14.4
More info needed?
Actually, I realized what's the problem even without the local info, sorry for the extra cycle.
So you are using the colorized layout, which is using ASCII escape codes for the coloring. Writing that to a file will include the ASCII escape characters -- that's what you see there. To open such a file, you would need eg less -R
or similar, as most text editors do not understand ASCII color codes.
To overcome this issue, what I'd rather do: if you need colorized layout in console and want to log into a file as well (without colors), then forget about appender_tee
and set up two loggers using the index
feature. Set up layout_glue_colors
for the console, and use a different layout for the file appended.
I hope this makes sense, so I'm closing the ticket, but let me know if there's any question.
Perfect, thank you!
Hi, i am currently working on implementing the logger package into production. The following code causes some strange numbers and signs when the code is executed manually in RStudio. If i use it from a cronjob it looks fine.
Here is the basic code:
Here is the file output
[1m[0mINFO[0m[0m[0m[22m [[3m2020-10-28 17:17:03[23m] [38;5;246mStarting Script[39m[0m[0m
Any ideas? Just updated to version 0.2 via Github still these issues. I am using R version 4.0.0 (2020-04-24) -- "Arbor Day"