[CritFix] - Fix reported length of logging structure
The logging code contains one place where the apparent size of the
logging structure is defined and then it's actually utilized in another
place. Re-writes and refactoring this code ended up with these
values to not co-relate what was previously there resulting in a stack
overwrite in last version or currently in log truncation.
Move assignment of logging structure to the place where it's actually
used, reducing future logic de-sync dangers. Also move the g_assert() to
the end as it should be a development aid only.