# Default logging should provide enough data for typical investigation of "can't dump"/"can't restore"
# Default logging should provide enough data for typical investigation of "can't dump"/"can't restore"
# It should be possible to add developer-only debugging to see some more details
# It should be possible to add developer-only debugging to see some more details
+
# It should be possible to shut the logger up completely (maybe by specifying the log file as /dev/null)
+
+
== Binary logging ==
+
+
Let's try to implement the idea of putting log arguments in binary form into a buffer and flushing one at the end if necessary.
+
+
The majority of time spent in sprintf is in converting arguments to strings (e.g. %d). Next goes scanning the format string. At the end the string copying itself goes. If we manage to eliminat at least the first portion, that would be great.
+
+
== Log messages structuring ==
+
+
CRIU generates tons of messages. The most critical to troubleshooting is the pr_err-s. Need to introduce types of errors to make troubleshooting easier. E.g. we have the guide what to do [[when C/R fails]]. Need to introduce error types into it and print them before the error text. Suggested types of failures are:
+
+
* Restore errors
+
** Resource ID conflict (mostly valid for non-containers case)