use this command when you want to filter docker logs of container for a specific period of time (eg: you want file content since 2 hours)and output the content to a text file
docker logs --since "$(date -d '2 hours ago' +%Y-%m-%dT%H:%M:%S)" <container_name_or_id> >& logname.txt