Logger to console

[rack::logger] Logs messages to a file or the console with decoration.|

How do I get this to output to the console instead of log.txt? Running linux.

Run Rack from a terminal window. Or tail -f the log.txt file.

I am running rack from terminal.

What kind of messages are you trying to see? Debug level? Are you running a development version you compiled or a release version?

INFO(…)

I’m running v1.dev.fb14007 I got a while ago (can’t remember details) as it caches the module browser which drives me nuts otherwise.

Just tried 1.1.5, still goes to log.txt.

It will for any binary build version. If you compile it yourself, you can use make run and it will log to console. For a binary build (or released) version, just open a second terminal and use tail -f ~/.Rack/log.txt to look at the log at runtime.

1 Like

I can work with that, thank you Christoph.

Doesn’t matter whether you compile yourself or use the production builds. Rack logs to log.txt when run in non-dev mode and the console when run in dev mode ./Rack -d -u ...

2 Likes

Now using:

tail -f ~/.Rack/log.txt | grep “Racket Science”

[0.612 info src/RSScratch.cpp:224] Racket Science:TESTING

Which updates when log.txt changes and only shows my output.

Figured I’d put this here for others who are possibly as clueless as I and might wish to do the same.

Thanks Andrew.

Ah, forgot about dev mode. I always run with make run out of the source tree when compiling myself.