I am trying to find the ipfs logs for content upload, download and the logs when an ipfs node in a cluster replicates the data to all other nodes.
I know we can check ipfs logs using ipfs log tail, but I can’t see logs having info for the operations I am looking for?
Also, can we configure all the logs to be written to a file just like ipfs cluster rest api.
Just use IPFS_LOGGING environment variable to set the level. The level set is standard: debug, info, warn, error, dpanic, panic, fatal. After setting of this variable, the daemon will throw the log messages of the selected level to stderr
I had a quick look, and it may be that the gateway handlers are not logging much at all. I see no calls to around here log.Info/Debug(...)
I recommend opening a feature request in go-ipfs about better logging of gateway requests (please search for existing issues first around this topic).
Your best-shot workaround, however, is to put the IPFS gateway behind an nginx reverse proxy, which will log everything you want and let you control other stuff that IPFS does not allow to customize (max request body size, timeouts etc).