MariaDB's binary mysqld respects [mariadb] and [mariadb-5.5] sections in my.cnf. Then, inside mysqld_safe script, settings in the sections above can be read using (read #1)
After that mysqld_safe specific settings is read using (read #2)
Imagine the following my.cnf:
As a result, after log-error setting was read in [mariadb] section (read #1), it is overloaded by mysqld_safe section after that (read #2). Generally, there is no way how to define mysqld_safe settings differently in mariadb.
So what I'm proposing is to introduce mariadb specific settings for mysqld_safe, which would mean basically to introduce new section with name for example [mariadb_mysqld_safe].
A patch could be very simple: