#include <ulxr_log4j.h>
Collaboration diagram for ulxr::Log4JSender:

Public Member Functions | |
| Log4JSender (const CppString &appname, TcpIpConnection &conn) | |
| Creates the Log4JSender object. | |
| ~Log4JSender () throw () | |
| Destructs Log4JSender object. | |
| void | open () |
| Opens the connection. | |
| void | close () |
| Closes the connection. | |
| void | send (const CppString &level, const CppString &message, const CppString &filename=ULXR_PCHAR(""), unsigned line=0) |
| Sends a message to the log host. | |
| ULXR_INT64 | currentTimeMillis () |
| The number of milliseconds elapsed from 1/1/1970 until logging event was created. | |
Private Attributes | |
| CppString | appname |
| TcpIpConnection & | conn |
| bool | network_error |
| CppString | threadname |
| unsigned long | seqnum |
| std::string | hostname |
| bool | disable_send |
| CppString | classname |
| CppString | methodname |
| bool | first_log4j |
Definition at line 44 of file ulxr_log4j.h.
| ulxr::Log4JSender::Log4JSender | ( | const CppString & | appname, | |
| TcpIpConnection & | conn | |||
| ) |
| ulxr::Log4JSender::~Log4JSender | ( | ) | throw () |
| void ulxr::Log4JSender::open | ( | ) |
Opens the connection.
Definition at line 99 of file ulxr_log4j.cpp.
References conn, disable_send, first_log4j, ulxr::Connection::isOpen(), network_error, and ulxr::TcpIpConnection::open().
Referenced by Log4JSender().
| void ulxr::Log4JSender::close | ( | ) |
Closes the connection.
Definition at line 84 of file ulxr_log4j.cpp.
References ulxr::TcpIpConnection::close(), conn, disable_send, ulxr::Connection::isOpen(), and network_error.
| void ulxr::Log4JSender::send | ( | const CppString & | level, | |
| const CppString & | message, | |||
| const CppString & | filename = ULXR_PCHAR(""), |
|||
| unsigned | line = 0 | |||
| ) |
Sends a message to the log host.
| level | debug Level | |
| message | debug message | |
| filename | filename of message origin | |
| line | line number in filename |
Definition at line 135 of file ulxr_log4j.cpp.
References appname, ulxr::asciiToUtf8(), classname, conn, currentTimeMillis(), disable_send, first_log4j, ulxr::getLatin1(), hostname, ulxr::HtmlFormHandler::makeNumber(), methodname, network_error, seqnum, threadname, ULXR_PCHAR, ulxr::unicodeToUtf8(), ulxr::Connection::write(), and ulxr::xmlEscape().
| ULXR_INT64 ulxr::Log4JSender::currentTimeMillis | ( | ) |
The number of milliseconds elapsed from 1/1/1970 until logging event was created.
Definition at line 117 of file ulxr_log4j.cpp.
References ULXR_INT64.
Referenced by send().
CppString ulxr::Log4JSender::appname [private] |
TcpIpConnection& ulxr::Log4JSender::conn [private] |
bool ulxr::Log4JSender::network_error [private] |
CppString ulxr::Log4JSender::threadname [private] |
unsigned long ulxr::Log4JSender::seqnum [private] |
std::string ulxr::Log4JSender::hostname [private] |
bool ulxr::Log4JSender::disable_send [private] |
CppString ulxr::Log4JSender::classname [private] |
CppString ulxr::Log4JSender::methodname [private] |
bool ulxr::Log4JSender::first_log4j [private] |
1.5.1