New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Modified logger to log to file that supports fail2ban #284
Conversation
Linked to #283. |
Thank you for your work! Everything looks great, but when I decided to test, I get a 500 error when I enter the wrong login or password during development. I also don’t see any errors in the server console, just this one in the response:
I'm trying to figure out what's causing it. |
@meltyshev I have not seen that when testing but I will take a look later today! What there a stack trace with that deeper that the JSON issue? |
My bad, this error is just on the client, because the response did not come in JSON format and the fetch failed to parse. In the real response I see the following:
But even if it's commented out, everything works, but there are no logs in the console and in the logfile too. |
Regarding the As for neither log sink working as intended: # const logLevel = process.env.NODE_ENV === 'production' ? logLevels.info : logLevels.debug;
const logLevel = process.env.NODE_ENV === 'production' ? 'info' : 'debug'; Two things could work here:
Let me know what you think works best here. |
I would prefer just the string-literals. Now with these changes, it works perfectly 👍 |
@meltyshev Ready for re-review! |
This PR aims to add the ability to expose Planka's logs to a logfile that can later be watched by fail2ban.
The logfile will mirror the console logs that already via
sails.js
with two additions: