[ 
https://issues.apache.org/jira/browse/LOG4J2-3027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17291019#comment-17291019
 ] 

Ralph Goers edited comment on LOG4J2-3027 at 2/25/21, 4:11 PM:
---------------------------------------------------------------

Please note that we now consider TcpSocketServer a "sample". We don't 
necessarily expect you to use it as is. Also note that serious security issues 
have been found when using the SerializedLayout. We recommend using Json 
instead. The ObjectInputStream that is used with the SerializedLayout uses the 
FilteredInputStream from log4j-api that will only allow specific packages. Any 
classes outside the allow list will not be allowed to be deserialized. You will 
have to look at the code to determine how to add packages to the allow list.


was (Author: [email protected]):
Please note that we now consider TcpSocketServer a "sample". We don't 
necessarily you to expect it as is. Also note that serious security issues have 
been found when using the SerializedLayout. We recommend using Json instead. 
The ObjectInputStream that is used with the SerializedLayout uses the 
FilteredInputStream from log4j-api that will only allow specific packages. Any 
classes outside the allow list will not be allowed to be deserialized. You will 
have to look at the code to determine how to add packages to the allow list.

> TcpSocketServer in latest log4j2 version (2.14.0)
> -------------------------------------------------
>
>                 Key: LOG4J2-3027
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3027
>             Project: Log4j 2
>          Issue Type: Question
>          Components: Appenders
>    Affects Versions: 2.14.0
>         Environment: maven
> tomcat
> java 8
>            Reporter: Mykola Holovach
>            Priority: Blocker
>
> Hi, i'm successfully used TcpSocketServer for appending my logs on remote 
> server using log4j2 2.8.2 version by the command bellow, now i need to move 
> to the latest version 2.14.0 but there no TcpSocketServer, could you help me 
> to explain how to up and use something like TcpSocketServer on the newest 
> version? Thanks in advance!
> {code:java}
> java -server -cp log4j-core-2.8.2.jar:log4j-api-2.8.2.jar:jcommander-1.48.jar 
> org.apache.logging.log4j.core.net.server.TcpSocketServer -p 1101 -c 
> logfinal-log4j.xml --classes java.util.ArrayList
> {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to