Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #30028

Re: log4j socket appender

From Nigel Wade <nmw@ion.le.ac.uk>
Newsgroups comp.lang.java.programmer
Subject Re: log4j socket appender
Date 2014-09-23 12:35 +0100
Message-ID <c8d486F49ekU1@mid.individual.net> (permalink)
References <64807899-4e1f-4a12-853b-ad521a27ec48@googlegroups.com> <lvi4ra$q92$1@dont-email.me> <lvih3n$443$1@dont-email.me> <0b888669-b830-499b-a935-80e1a6900ed3@googlegroups.com>

Show all headers | View raw


On 22/09/14 16:29, doug.farrell@gmail.com wrote:
> Hi all,
>
> Thanks for the responses, I'm a complete Java novice, so struggling to follow along. However, the JsonLayout provided by the jackson-core JAR seems to apply to creating and reading configuration files in JSON format, not streaming output from a log4j (version 2.*) to a socket appender. Am I mistaken about this?
>
> Thanks again,
> Doug
>


I've never used the SocketAppender, and from looking at the API docs. I presume you are using log4j version 2,
previously it seems as though SocketAppender would only send serialized messages over TCP.

What format is your logging server expecting the log messages to be in? If you want a text format try using the same 
PatternLayout as you do for the ConsoleAppender.

-- 
Nigel Wade

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

log4j socket appender doug.farrell@gmail.com - 2014-09-19 13:34 -0700
  Re: log4j socket appender Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-09-19 16:48 -0400
    Re: log4j socket appender markspace <markspace@nospam.nospam> - 2014-09-19 17:17 -0700
      Re: log4j socket appender doug.farrell@gmail.com - 2014-09-22 08:29 -0700
        Re: log4j socket appender Nigel Wade <nmw@ion.le.ac.uk> - 2014-09-23 12:35 +0100
          Re: log4j socket appender doug.farrell@gmail.com - 2014-10-02 06:23 -0700
  Re: log4j socket appender Marcel Mueller <news.5.maazl@spamgourmet.org> - 2014-09-20 11:46 +0200
    Re: log4j socket appender Kevin McMurtrie <mcmurtrie@pixelmemory.us> - 2014-09-20 10:17 -0700
      Re: log4j socket appender markspace <markspace@nospam.nospam> - 2014-09-20 13:29 -0700
        Re: log4j socket appender Jeff Higgins <jeff@invalid.invalid> - 2014-09-20 23:05 -0400

csiph-web