logging server in c