Re: Logging and containers

2018-08-07 Thread Matt Sicker
I had requested the HTTP appender a while back for potential use in writing directly to Elasticsearch which helps reduce the moving parts involved in any sort of log searching stack. There's also the option of hosting a Graylog server and writing directly to it through a socket appender, though I h

Re: Logging and containers

2018-08-06 Thread Ralph Goers
Thanks for that. I see that the AWS SDK has a Java CloudWatch API that could be used to create an Appender. I also see https://docs.aws.amazon.com/lambda/latest/dg/java-logging.html where amazon provides an appender. The example s

Re: Logging and containers

2018-08-06 Thread Vaid, Himali
We use docker containers running as ECS on AWS Ec2, I use log4net AWS appender to write directly to AWS cloudwatch. Sent from my iPhone > On Aug 6, 2018, at 6:38 PM, Remko Popma wrote: > > I have no experience with containers at all, sorry... > >> On Tue, Aug 7, 2018 at 1:13 AM, Matt Sicker

Re: Logging and containers

2018-08-06 Thread Remko Popma
I have no experience with containers at all, sorry... On Tue, Aug 7, 2018 at 1:13 AM, Matt Sicker wrote: > The way I've used Docker in the past has generally been to configure log4j2 > to use a direct console appender (non-default option), async logging, and > then use a logging driver from Dock

Re: Logging and containers

2018-08-06 Thread Matt Sicker
The way I've used Docker in the past has generally been to configure log4j2 to use a direct console appender (non-default option), async logging, and then use a logging driver from Docker or Kubernetes or even some cloud-specific log gathering service, which listen to standard out and standard erro

Re: Logging and containers

2018-08-06 Thread Ralph Goers
Do you have any way of determining the performance difference of writing to a fie vs writing to stdout? Ralph > On Aug 6, 2018, at 8:47 AM, Rob Tompkins wrote: > > I find myself writing to either standard out or a file. When I write to a > file in docker I tend to “share” that file with the f

Re: Logging and containers

2018-08-06 Thread Rob Tompkins
I find myself writing to either standard out or a file. When I write to a file in docker I tend to “share” that file with the filesystem on the docker host. But, I prefer writing to standard our and appending that to a file on the machine as it deals with less of the underlying filesystem networ

Re: Logging and containers

2018-08-06 Thread Ralph Goers
I don’t know. That is why I am asking if you guys have tried anything with Docker containers. Writing to stdout is a “best practice” so I am just trying to validate whether that is good or bad advice or what needs to be done to make it work well. Or if Log4j should implement a Docker plugin to w

Re: Logging and containers

2018-08-06 Thread Gary Gregory
Can't you just configure the console appender with a large-ish buffer and remove the bottleneck? Gary On Mon, Aug 6, 2018 at 8:55 AM Ralph Goers wrote: > So that begs the question, when logging to stdout in a container is a > console attached? i.e. can you normally view the output like you coul

Re: Logging and containers

2018-08-06 Thread Ralph Goers
So that begs the question, when logging to stdout in a container is a console attached? i.e. can you normally view the output like you could in a regular VM or is it all redirected somewhere else? I haven’t worked much with Docker yet so I am afraid I don’t know the answer. Ralph > On Aug 6,

Re: Logging and containers

2018-08-06 Thread Remko Popma
It may be to do with whether a tty is attached and how fast it is: https://stackoverflow.com/questions/3857052/why-is-printing-to-stdout-so-slow-can-it-be-sped-up (Shameless plug) Every java main() method deserves http://picocli.info > On Aug 6, 2018, at 4:21, Ralph Goers wrote: > > Our perfor

Logging and containers

2018-08-05 Thread Ralph Goers
Our performance page shows that logging to the console is extremely slow. Yet one of the “best practices” for containers is to have the applications log to STDOUT or STDERR. This leads me to two questions: Is the performance of writing to STDOUT just as bad in a container? I have no reason to be