Skip to content
This repository has been archived by the owner on Apr 26, 2019. It is now read-only.

Provide a option to write log on stdout #24

Closed
bdpiprava opened this issue Apr 10, 2017 · 3 comments
Closed

Provide a option to write log on stdout #24

bdpiprava opened this issue Apr 10, 2017 · 3 comments

Comments

@bdpiprava
Copy link
Contributor

  • Currently log is written on file. Allow a user to provide alternate way of writing a log.

This issue is opened in favor of Configure logging drivers

@Stono
Copy link

Stono commented Jun 27, 2017

+1 this is very annoying, stdout is where we want our logs in most situations with docker.

@bdpiparva : you can work around this buy building your own container FROM this image, and overriding the entrypoint with a custom script that starts the agent, and then tails the log:

#!/bin/bash
function stop()
{
	echo "Stopping GoCD Agent..."
	kill $gocd_pid
	kill $tail_pid
	echo "Stopped."
	exit 0
}

function start() {
	echo "Starting GoCD Agent..."
	./docker-entrypoint.sh &	
	gocd_pid=$!

	sleep 3
        # Change this to a different log file if theres something else you want to log
	tail -f /go/go-agent-bootstrapper.out.log &
	tail_pid=$!

	echo "Started (GoCD: $gocd_pid, LogTail: $tail_pid)."
}

trap stop TERM INT SIGHUP
start
wait $gocd_pid

Not great, but it'll do for now.

@sennerholm
Copy link

Hi!

I think that 2b7c7c2 is changing the behavior so everything should get to stdout, but I don't know when it will be released. I guess september from new version in changelog (17.9.0).

/Mikael

@ketan
Copy link
Member

ketan commented Aug 31, 2017

This will be released either tomorrow, or early next week.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants