Hi Ganesh,

On Tue, 2 May 2023 at 04:12, Ganesh S <ganesh123.g...@gmail.com> wrote:
> I'm trying to implement remote logging for my application which is running
> in a docker container.
> The remote server provider is Papertrail.
> I want to specify a custom local host name, currently it is taking
> container id, which I don't want.

As Volkan explained, Log4j2 uses the hostname of your OS as syslog hostname.

I think that your problem is that the hostname of your Docker
container is not what you would expect. You can change it with
`--hostname` parameter to `docker run`:

https://docs.docker.com/config/containers/container-networking/

Piotr

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to