Open EPashkin opened 10 years ago
This is not specific to hslogger and seems to happen in any application linked with SDL2 when run using stack run
on windows
@expipiplus1 Did you find a solution for it?
@BuBuMan Can't remember, sorry!
Perhaps it's this: https://github.com/haskell-game/sdl2/issues/86#issuecomment-523928830
(so adding -optl-mconsole
might fix it)
Error occurs when attempting to log anything in SDL application
I made test application in EPashkin/hslogger_SDL_test bad branch Problem can be fixed on application side if call
removeAllHandlers
before any log action (ex. in startsetupLogger
). Source of problem is very strange value ofstderr
. Don't found way detect it,stderr
still opened and writable. SimplyhPutChar stderr 'g'
will also fail.P.S. Failing handler IMHO created in
System.Log.Logger.logTree
. P.P.S. ~~When application started from console (cabal run
) it works fine even on WARNING, buthPutChar stderr 'g'
still failing.~~ (Sorry, was wrong. Error still showing.)