Comments (7)
Both are valid features (having the logs during a run and a dedicated dockers:logs
goals for showing the logs on demand and both should of course use the same mechanism.
For the logging mentioned in #8 one would need some extra threads stream out the log as it happenns asynchronously, for docker:logs
a single call to the Docker remote API for getting the current log would be enough (but of course something like tail -f
would be fine, to)
Also I would like to have all logs from all containers mixed together, with lines coming from different containers higlight somehow (with color and/or prefix). This is also how fig it does.
I already have some ideas how to implement that and this will come quite soon.
from docker-maven-plugin.
oh and here i was ready to take this on...
my logs already contain ansi coloring, so you would need to take that into account (for everyone, not just me) as part of whatever you're thinking of.
from docker-maven-plugin.
Coloring would be optional, so if you already have colouring one could switch that off (and colouring is switched on only when a TTY is attached). Alternatively a prefix could be configured (a coloured prefix is that what fig uses to print out the tty output).
The tricky part is to parse the chunked response and when printing to the console from multiple threads than some synchronisation is required (i.e. a dedicated thread printing out the log lines coming in from multiple containers line by line).
Also when using as a maven goal, then it should be possible to specify image via -Dimage
for which to print out the logs.
I already have some prototype which I polish and add tomorrow. Sorry, I didn't want to take this off from you, but as I said I already have some very concrete ideas. But as soon as it is in, I really would like to get your opinion on this.
from docker-maven-plugin.
lol - i'm not that sad. :)
looking forward to seeing what you've come up with.
from docker-maven-plugin.
;-)
from docker-maven-plugin.
commenting here b/c this is the correct place ;)
i tried this out a little today and so far so good. the one big piece of feedback do i have is if we (you) want to have some parity w/ docker, the goal should be called logs
and not log
.
also my first instinct is to type mvn docker:logs
given all the other goal names directly match a docker command.
from docker-maven-plugin.
Good catch. Will change this for the upcoming release 0.10.5
There are still some issues with ordering of log entries from multiple containers, but these will be tackled later on.
from docker-maven-plugin.
Related Issues (20)
- How to actually get verbose output from docker:build? HOT 8
- Quickstarts : Update Spring Boot With Jib Quickstart Spring Version to latest 2.x version HOT 1
- Build fails with podman and extra labels
- RegistryServiceTest : remove unused variable `hasImage` and `dockerFileUtilMockedStatic` HOT 3
- LogRequestor : Replace `com.google.common.base.Charsets.UTF_8` with `StandardCharsets.UTF_8` HOT 5
- Turning on JIB mode breaks multi-assembly images HOT 2
- <run><wait> no longer working correctly
- Cannot find default setter in class io.fabric8.maven.docker.config.ImageConfiguration while trying to execute docker:start goal HOT 1
- Can't use <packaging>docker</packaging> in a multi-module project HOT 1
- Version 0.44.0 fails to use the `<args>` configuration to populate the Docker build-args HOT 5
- support Dockerfile RUN <<EOF HOT 1
- docker:push failed with ARG in FROM HOT 5
- DockerComposeServiceWrapper : Use `isEmpty()` to check collection is empty HOT 3
- WatchService : Anonymous `new Runnable()` can be replaced with lambda HOT 5
- Quickstarts : Improve `it/spring-boot-with-jib` integration test HOT 2
- Ability to
- Error Encountered When Building Multi-Architecture Docker Images Using docker-maven-plugin HOT 1
- Write portPropertyFile as soon as the container is started
- Unable to push docker images to Nexus using "docker-maven-plugin" HOT 1
- External Compose and Wait seems not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-maven-plugin.