The user/lib/jdbc
folder will only be picked up by dedicated classloaders in Ignition used for database operations. You'll have to copy the mariadb jar to somewhere on the global gateway classpath for logback to pick it up... probably lib/core/gateway
is the "best" place, though as you're finding, this approach in general has some problems.
I'll post this link just for posterity, in case you're able to get more success with e.g. a syslog based approach: Logging Configuration Properties - Java Service Wrapper
You could also just modify (or duplicate) the system logs config in logback
and do the SQLite -> MariaDB step manually using your programming language of choice.