i have followed Docker Compose Installation for the creating docker compose file .
may i know the path i can use for storing log files ? this is my configuration in docker-compose.yml
volumes:
- ./models:/app/models
- ./environments.yml:/app/environments.yml
- ./credentials.yml:/app/credentials.yml
- ./endpoints.yml:/app/endpoints.yml
- ./logs:/logs
- ./auth:/app/auth
and
this is my python script
logger = logging.getLogger(__name__)
for handler in logging.root.handlers[:]:
logging.root.removeHandler(handler)
logging.basicConfig(level=logging.INFO,
format='%(asctime)s %(message)s',
datefmt='%a, %d %b %Y %H:%M:%S',
filename= './logs/data.log',
filemode='w')
console = logging.StreamHandler()
console.setLevel(logging.INFO)
but when i am running debug sudo docker-compose logs app
app_1 | FileNotFoundError: [Errno 2] No such file or directory: '/app/logs/data.log'