The task returned by design should be used for further processing in your code, and that is why the developer took the right to cut the log, also because the return can be a pretty big result of the development and can make unreadable log information output. Of course, I could be wrong, but since I work with celery, I always considered this logic to be correct and never bothered me. In your case, I believe that it makes sense to register a message immediately before returning using logger.info (this will not be truncated), and if the message you are returning is not really needed for further processing, but only for logging purposes no need to return any value.
source share