3 ms·
I'd go a bit further. Log before the operation. If you want the duration, log it separately, afterwards. This prevents issues where the long operation fails fo
by viraptor 10y ago
I'd go a bit further. Log before the operation. If you want the duration, log it separately, afterwards.
This prevents issues where the long operation fails for some reason and never leaves a trace. Yes, you should also log failures, but sometimes that may fail too if the long process manages to crash everything.