In general, I'd like each mountPoint to have it's own deployment log. If I'm not mistaken, the log property of a gluscript will send all messages to the agent log file. Is there a (simple) way to configure it to write to it's own log file (possibly parameterized by mountPoint)? If not, how would you approach this situation?
Here's a bit more of backstory. Some of our deployments print to stdout/stderr and the output can be very valuable when verifying or debugging them. For example, one of our scripts imports a bunch of stuff over some web services, and the output may be something like:
Uploading files to server1
Uploading files to server2
Updating domain1 at server1
Updating domain2 at server1
Updating domain1 at server2
and so on. We have a large number of environments, so we could end up interleaving a lot of information in the agents log from a lot of different deployments. In this case, I think that having all of the output in its own place simplifies the verification and debugging process.
I'm open to other suggestions and patterns of course.
It actually dumps everything on the console and the agent startup script is the one redirecting to a file. If you have a finite set of mountPoint and you already know what they are then I suppose you can modify the log4j.xml to create multiple files per mountPoint and then simply dispatch according to the name (ex: org.linkedin.glu.agent.script./x/i001)
I am not an expert in log4j but I am pretty sure you can create your own appender (maybe one already exists...) to achieve what you want more dynamically (meaning the filename is based on the last part of the logger name...)
Due to the easy way to package agent now (since 5.1.0), it would be fairly easy to add a jar file and provide your own log4j.xml to generate your own agent distribution.
I don't have much time to look into it myself at this time but will be happy to provide guidance/review.