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


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

Re: log4j socket appender

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!goblin1!goblin.stu.neva.ru!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Nigel Wade <nmw@ion.le.ac.uk>
Newsgroups comp.lang.java.programmer
Subject Re: log4j socket appender
Date Tue, 23 Sep 2014 12:35:34 +0100
Lines 18
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>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net DwOEt2ZbpVzq4uqclRtSCgD7Lh8VQYG0A3IZYGTNAVlG7Q2TO9
Cancel-Lock sha1:+U3/n2Armfww6kheyqXZZeK25Gs=
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5
In-Reply-To <0b888669-b830-499b-a935-80e1a6900ed3@googlegroups.com>
Xref csiph.com comp.lang.java.programmer:30028

Show key headers only | 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