Skip to content

Commit 94b1b4c

Browse files
Zhen Lizhenlineo
authored andcommitted
Remove bolt message logging as it is not used
1 parent 8084373 commit 94b1b4c

File tree

54 files changed

+103
-1565
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+103
-1565
lines changed

community/bolt/src/main/java/org/neo4j/bolt/BoltChannel.java

Lines changed: 1 addition & 11 deletions
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -23,7 +23,6 @@
23

23

24
import java.net.SocketAddress;
24
import java.net.SocketAddress;
25

25

26-
import org.neo4j.bolt.logging.BoltMessageLogger;
27
import org.neo4j.kernel.api.net.TrackedNetworkConnection;
26
import org.neo4j.kernel.api.net.TrackedNetworkConnection;
28

27

29
/**
28
/**
@@ -35,30 +34,22 @@ public class BoltChannel implements AutoCloseable, TrackedNetworkConnection, Bol
35
private final long connectTime;
34
private final long connectTime;
36
private final String connector;
35
private final String connector;
37
private final Channel rawChannel;
36
private final Channel rawChannel;
38-
private final BoltMessageLogger messageLogger;
39

37

40
private volatile String user;
38
private volatile String user;
41

39

42-
public BoltChannel( String id, String connector, Channel rawChannel, BoltMessageLogger messageLogger )
40+
public BoltChannel( String id, String connector, Channel rawChannel )
43
{
41
{
44
this.id = id;
42
this.id = id;
45
this.connectTime = System.currentTimeMillis();
43
this.connectTime = System.currentTimeMillis();
46
this.connector = connector;
44
this.connector = connector;
47
this.rawChannel = rawChannel;
45
this.rawChannel = rawChannel;
48-
this.messageLogger = messageLogger;
49-
messageLogger.serverEvent( "OPEN" );
50
}
46
}
51

47

52
public Channel rawChannel()
48
public Channel rawChannel()
53
{
49
{
54
return rawChannel;
50
return rawChannel;
55
}
51
}
56

52

57-
public BoltMessageLogger log()
58-
{
59-
return messageLogger;
60-
}
61-
62
@Override
53
@Override
63
public String id()
54
public String id()
64
{
55
{
@@ -107,7 +98,6 @@ public void close()
107
Channel rawChannel = rawChannel();
98
Channel rawChannel = rawChannel();
108
if ( rawChannel.isOpen() )
99
if ( rawChannel.isOpen() )
109
{
100
{
110-
messageLogger.serverEvent( "CLOSE" );
111
rawChannel.close().syncUninterruptibly();
101
rawChannel.close().syncUninterruptibly();
112
}
102
}
113
}
103
}

community/bolt/src/main/java/org/neo4j/bolt/BoltServer.java

Lines changed: 5 additions & 8 deletions
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -25,7 +25,6 @@
25
import java.time.Clock;
25
import java.time.Clock;
26
import java.util.Map;
26
import java.util.Map;
27

27

28-
import org.neo4j.bolt.logging.BoltMessageLogging;
29
import org.neo4j.bolt.runtime.BoltConnectionFactory;
28
import org.neo4j.bolt.runtime.BoltConnectionFactory;
30
import org.neo4j.bolt.runtime.BoltConnectionReadLimiter;
29
import org.neo4j.bolt.runtime.BoltConnectionReadLimiter;
31
import org.neo4j.bolt.runtime.BoltSchedulerProvider;
30
import org.neo4j.bolt.runtime.BoltSchedulerProvider;
@@ -113,8 +112,6 @@ public void start() throws Throwable
113
Log userLog = logService.getUserLog( BoltServer.class );
112
Log userLog = logService.getUserLog( BoltServer.class );
114

113

115
InternalLoggerFactory.setDefaultFactory( new Netty4LoggerFactory( logService.getInternalLogProvider() ) );
114
InternalLoggerFactory.setDefaultFactory( new Netty4LoggerFactory( logService.getInternalLogProvider() ) );
116-
BoltMessageLogging boltLogging = BoltMessageLogging.create( fs, jobScheduler, config, log );
117-
life.add( boltLogging );
118

115

119
Authentication authentication = createAuthentication();
116
Authentication authentication = createAuthentication();
120

117

@@ -131,7 +128,7 @@ public void start() throws Throwable
131
if ( !config.enabledBoltConnectors().isEmpty() && !config.get( GraphDatabaseSettings.disconnected ) )
128
if ( !config.enabledBoltConnectors().isEmpty() && !config.get( GraphDatabaseSettings.disconnected ) )
132
{
129
{
133
NettyServer server = new NettyServer( jobScheduler.threadFactory( boltNetworkIO ),
130
NettyServer server = new NettyServer( jobScheduler.threadFactory( boltNetworkIO ),
134-
createConnectors( boltProtocolFactory, throttleGroup, boltLogging, log ), connectorPortRegister, userLog );
131+
createConnectors( boltProtocolFactory, throttleGroup, log ), connectorPortRegister, userLog );
135
life.add( server );
132
life.add( server );
136
log.info( "Bolt server loaded" );
133
log.info( "Bolt server loaded" );
137
}
134
}
@@ -155,15 +152,15 @@ private BoltConnectionFactory createConnectionFactory( Config config, BoltSchedu
155
}
152
}
156

153

157
private Map<BoltConnector,ProtocolInitializer> createConnectors( BoltProtocolFactory boltProtocolFactory,
154
private Map<BoltConnector,ProtocolInitializer> createConnectors( BoltProtocolFactory boltProtocolFactory,
158-
TransportThrottleGroup throttleGroup, BoltMessageLogging boltLogging, Log log )
155+
TransportThrottleGroup throttleGroup, Log log )
159
{
156
{
160
return config.enabledBoltConnectors()
157
return config.enabledBoltConnectors()
161
.stream()
158
.stream()
162-
.collect( toMap( identity(), connector -> createProtocolInitializer( connector, boltProtocolFactory, throttleGroup, boltLogging, log ) ) );
159+
.collect( toMap( identity(), connector -> createProtocolInitializer( connector, boltProtocolFactory, throttleGroup, log ) ) );
163
}
160
}
164

161

165
private ProtocolInitializer createProtocolInitializer( BoltConnector connector, BoltProtocolFactory boltProtocolFactory,
162
private ProtocolInitializer createProtocolInitializer( BoltConnector connector, BoltProtocolFactory boltProtocolFactory,
166-
TransportThrottleGroup throttleGroup, BoltMessageLogging boltLogging, Log log )
163+
TransportThrottleGroup throttleGroup, Log log )
167
{
164
{
168
SslContext sslCtx;
165
SslContext sslCtx;
169
boolean requireEncryption;
166
boolean requireEncryption;
@@ -199,7 +196,7 @@ private ProtocolInitializer createProtocolInitializer( BoltConnector connector,
199
}
196
}
200

197

201
ListenSocketAddress listenAddress = config.get( connector.listen_address );
198
ListenSocketAddress listenAddress = config.get( connector.listen_address );
202-
return new SocketTransport( connector.key(), listenAddress, sslCtx, requireEncryption, logService.getInternalLogProvider(), boltLogging,
199+
return new SocketTransport( connector.key(), listenAddress, sslCtx, requireEncryption, logService.getInternalLogProvider(),
203
throttleGroup, boltProtocolFactory, connectionTracker );
200
throttleGroup, boltProtocolFactory, connectionTracker );
204
}
201
}
205

202

community/bolt/src/main/java/org/neo4j/bolt/diagnostics/BoltDiagnosticsOfflineReportProvider.java

Lines changed: 0 additions & 65 deletions
This file was deleted.

community/bolt/src/main/java/org/neo4j/bolt/logging/BoltMessageLog.java

Lines changed: 0 additions & 132 deletions
This file was deleted.

community/bolt/src/main/java/org/neo4j/bolt/logging/BoltMessageLogger.java

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)