That could be one way, but there are drawbacks to that approach. An example is what if your SP inserted a row in some table. It then tried to insert another row which fails for whatever reason. If you then insert the log row and commit it, you would also commit the first insert, which may not be what is desired.
It would probably be better to just write to a flat log file (like db2diag.log).
This link might be of use:
http://www.ibm.com/developerworks/db...0302izuha.html
Andy