Hello,
On my project, I want to log some messages with the lualogging library using the console appender.
However, when I start the project like "love /path/to/project", the log messages do not appear anywhere.
How can i get the console messages, like those that would be printed with print("test") ?
Regards
Catch log console messages
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Party member
- Posts: 512
- Joined: Wed Oct 05, 2016 11:53 am
Re: Catch log console messages
Sometimes, depending on OS or your code editor, you may have to turn off buffering for stdout to make any print() messages appear in console in real time.
Just put that line of code into conf.lua, or at the top of main.lua of your project. More information here.
Alternatively, on windows you may enable the console to appear via conf.lua (set t.console to true), or run your project with lovec.exe, as opposed to love.exe.
Code: Select all
io.stdout:setvbuf("no")
Alternatively, on windows you may enable the console to appear via conf.lua (set t.console to true), or run your project with lovec.exe, as opposed to love.exe.
Re: Catch log console messages
Hi,
Thanks for your answeer.
On windows 10, I can see log messages on the console with lovec.exe. With love.exe, no matter what I do, log messages do not appear.
Trouble now is that I launch love from emacs with this function :
and this function does not work with lovec.exe, I wonder why ?
What are the differences between love.exe and lovec.exe ?
Thanks for your help
Regards
Thanks for your answeer.
On windows 10, I can see log messages on the console with lovec.exe. With love.exe, no matter what I do, log messages do not appear.
Trouble now is that I launch love from emacs with this function :
Code: Select all
(defun love/start ()
"Run LÖVE externally for the sake of playtesting."
(interactive)
(if (buffer-live-p "*love*")
(kill-buffer "*love*"))
(start-process "löve" "*love*" love-exe (file-name-directory (buffer-file-name))))
What are the differences between love.exe and lovec.exe ?
Thanks for your help
Regards
Re: Catch log console messages
love.exe is compiled as a GUI program while lovec.exe is compiled as a console program - that's all. You really should be able to run lovec.exe if you can run love.exe.
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
"If each mistake being made is a new one, then progress is being made."
Re: Catch log console messages
Isn't lovec.exe it's just love, but with attached to it console?
Who is online
Users browsing this forum: Google [Bot] and 155 guests