So locally when in dev through xcode
or compiled with SPM
the console logs appear as expected.
i.e with SPM
locally everything is fine
swift build --configuration release
.build/release/Myapp # prints to console
but when I am running the executable through a docker container running on ECS (linux I suppose), I don't see the logs generated by my Swift code but I do see stderr being printed by 3rd party libraries (i.e. libssl is printing errors) as well as shell logs when starting the application
For example:
Dockerfile
FROM swift
WORKDIR /app
COPY Package.swift ./
COPY Sources ./Sources
COPY Tests ./Tests
RUN swift package clean
RUN swift build --configuration release
RUN chmod +x start.sh
CMD ["start.sh"] # just a wrapper to see if "echo" works
in start.sh
# prints as expected
echo "hi this will print"
# nothing in the executable will print though
.build/release/MyApp