# When I use Codec plugins of multiline through TCP Input plugins to receive date from org.apache.log4j.net.SocketAppender(Log4j 1.x ) ,what charset of Codec plugins of multiline should be set?

**URL:** https://discuss.elastic.co/t/when-i-use-codec-plugins-of-multiline-through-tcp-input-plugins-to-receive-date-from-org-apache-log4j-net-socketappender-log4j-1-x-what-charset-of-codec-plugins-of-multiline-should-be-set/68633
**Category:** Logstash
**Created:** [December 11, 2016, 2:21am UTC](https://discuss.elastic.co/t/when-i-use-codec-plugins-of-multiline-through-tcp-input-plugins-to-receive-date-from-org-apache-log4j-net-socketappender-log4j-1-x-what-charset-of-codec-plugins-of-multiline-should-be-set/68633 "2016-12-11T02:21:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![wenhuaixiang](https://avatars.discourse-cdn.com/v4/letter/w/ee7513/32.png) [@wenhuaixiang](https://discuss.elastic.co/u/wenhuaixiang)
#### Post date: [December 11, 2016, 2:21am UTC](https://discuss.elastic.co/t/when-i-use-codec-plugins-of-multiline-through-tcp-input-plugins-to-receive-date-from-org-apache-log4j-net-socketappender-log4j-1-x-what-charset-of-codec-plugins-of-multiline-should-be-set/68633/1 "2016-12-11T02:21:05Z")

</div>

The log is that  
"Received an event that has a different character encoding than you configured {:text=\>"\xAC\xED\u0000\u0005sr\u0000!org.apache.log4j.spi.LoggingEvent\xF3\xF2\xB9#t\v\xB5?\u0003\u0000\nZ\u0000\u0015mdcCopyLookupRequiredZ\u0000\u0011ndcLookupRequiredJ\u0000\ttimeStampL\u0000\fcategoryNamet\u0000\u0012Ljava/lang/String;L\u0000\flocationInfot\u0000#Lorg/apache/log4j/spi/LocationInfo;L\u0000\amdcCopyt\u0000\u0015Ljava/util/Hashtable;L\u0000\u0003ndcq\u0000~\u0000\u0001L\u0000\u000FrenderedMessageq\u0000~\u0000\u0001L\u0000\nthreadNameq\u0000~\u0000\u0001L\u0000\rthrowableInfot\u0000+Lorg/apache/log4j/spi/ThrowableInformation;xp\u0000\u0000\u0000\u0000\u0001X\xE9\xF5ҙt\u0000\u0017log4jtest.log4jtest\_oldsr\u0000!org.apache.log4j.spi.LocationInfo홻\xE1J\x91\xA5|\u0002\u0000\u0001L\u0000\bfullInfoq\u0000~\u0000\u0001xpt\u00003log4jtest.log4jtest\_old.main(log4jtest\_old.java:46)ppt\u0000\u0000t\u0000\u0004mainsr\u0000)org.apache.log4j.spi.ThrowableInformation\xBE\u0018\xFE\xE0\x81r\u000FQ\u0002\u0000\u0001[\u0000\u0003rept\u0000\u0013[Ljava/lang/String;xpur\u0000\u0013[Ljava.lang.String;\xAD\xD2V\xE7\xE9\u001D{G\u0002\u0000\u0000xp\u0000\u0000\u0000\u0003t\u0000\u001Ejava.lang.NullPointerExceptiont\u00000\tat errorlog4j.logtest.caculate(logtest.java:13)t\u00007\tat log4jtest.log4jtest\_old.main(log4jtest\_old.java:36)w\u0004\u0000\u0000\x9C@pxy", :expected\_charset=\>"UTF-8"}

"

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [December 14, 2016, 10:15pm UTC](https://discuss.elastic.co/t/when-i-use-codec-plugins-of-multiline-through-tcp-input-plugins-to-receive-date-from-org-apache-log4j-net-socketappender-log4j-1-x-what-charset-of-codec-plugins-of-multiline-should-be-set/68633/2 "2016-12-14T22:15:23Z")

</div>

Use a log4j input to receive events from a SocketAppender. Do not use a tcp input.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 11, 2017, 10:15pm UTC](https://discuss.elastic.co/t/when-i-use-codec-plugins-of-multiline-through-tcp-input-plugins-to-receive-date-from-org-apache-log4j-net-socketappender-log4j-1-x-what-charset-of-codec-plugins-of-multiline-should-be-set/68633/3 "2017-01-11T22:15:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
