-
Notifications
You must be signed in to change notification settings - Fork 2
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
Error in sprintf(message, ...) : too few arguments when try to log to database #6
Comments
I have tried with MySQL database but got the same error:
|
do you get ther error when initializing the table, or when trying to log something? (e.g. lg$fatal("error happaned")) and can you maybe post the edit: I am fairly certain there is a deeper problem at play here that is masked by a second error in the function that constructs the error message, so I need the traceback for further analysis :( |
I don't have the table. Actually the database is empty (not tables at all).
|
hmm it seems something is wrong with the layout... With the latest lgrExtra version from github you should now at least get the correct error message... . I can't debug it now because i'll set up a db but i'll look into it when I get around to it. can you try setting the layout explicitly:
(or LayoutPostgres for postgress) If that doesn't work, it should be possible to create the target log table manually first, with column types like this:
(creating the table manually is kinda "nicer" anyways IMHO, but i still have to look into why it doesnt work) |
for this part :
it says:
so I tried:
I got the same error:
Then, I have created the table myself:
then, this code works:
and I can see data in my table afterwords:
EDIT:
|
Ok glad that the workaround works. I hope I get around fixing the problem soon, all this DB stuff is sadly a bit complicated to debug. Nevertheless i generally recommended to generate the target tables manually anyways. |
Agree it is better to crate db manually. Thanks! |
So it seems I intentionally disabled automatic creation of log tables for most databases (except sqlite). If it's no hassle, could you provide me the datatypes you are using for either postgres or mariadb as inspiration? (whatever you ended up using) |
I have tried to start logging to database:
but I get an error:
The text was updated successfully, but these errors were encountered: