Apache Log4cxx  Version 2.0.0
Loading...
Searching...
No Matches
jsonsocketappender.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef _LOG4CXX_NET_JSON_SOCKET_APPENDER_H
19#define _LOG4CXX_NET_JSON_SOCKET_APPENDER_H
20
22
23namespace LOG4CXX_NS
24{
25namespace net
26{
27
51
52class LOG4CXX_EXPORT JSONSocketAppender : public SocketAppenderSkeleton
53{
54 public:
60
61
69
73 JSONSocketAppender(const helpers::InetAddressPtr& address, int port);
74
78 JSONSocketAppender(const LogString& host, int port);
79
80 protected:
81 int getDefaultDelay() const override;
82
83 int getDefaultPort() const override;
84
85 private:
86 // prevent copy and assignment statements
88 JSONSocketAppender& operator=(const JSONSocketAppender&);
89
90}; // class JSONSocketAppender
91
93
94} // namespace net
95} // namespace log4cxx
96
97#endif // _LOG4CXX_NET_JSON_SOCKET_APPENDER_H
98
AppenderSkeleton(LOG4CXX_PRIVATE_PTR(AppenderSkeletonPrivate) priv)
Sends spi::LoggingEvent elements to a remote a log server, usually in JSON format.
Definition jsonsocketappender.h:53
int getDefaultPort() const override
int getDefaultDelay() const override
JSONSocketAppender()
An unconnected appender using the default port.
SocketAppenderSkeleton(int defaultPort, int millisecondDelay)
A unconnected appender sending to defaultPort, with a retry after millisecondDelay when unable to est...
Definition propertysetter.h:27
Definition jsonsocketappender.h:26
LOG4CXX_PTR_DEF(JSONSocketAppender)
std::basic_string< logchar > LogString
Definition logstring.h:51
#define LOG4CXX_CAST_ENTRY(Interface)
Definition object.h:153
#define END_LOG4CXX_CAST_MAP()
Definition object.h:147
#define DECLARE_LOG4CXX_OBJECT(object)
Definition object.h:41
#define LOG4CXX_CAST_ENTRY_CHAIN(Interface)
Definition object.h:159
#define BEGIN_LOG4CXX_CAST_MAP()
Definition object.h:141