Event-Provider
To send Events to the lema-server you have a an event provider. Currently we only support an log4j appender. In order to use it you need log4j (>= 1.2.8). Simply add the lema-log4j-provider to your classpath.
Configuration in log4j.properties
Add a new appender, for instance LemaAppender:
log4j.rootLogger=INFO, Console, LemaAppender
Configure the appender:
log4j.appender.LemaAppender=de.lema.appender.LemaAppender log4j.appender.LemaAppender.Threshold=INFO log4j.appender.LemaAppender.Application=YourApplication log4j.appender.LemaAppender.EnviornmentId=3 log4j.appender.LemaAppender.RemoteHost=192.168.0.50 log4j.appender.LemaAppender.ConnectOnDemand=true log4j.appender.LemaAppender.ConnectOnDemandDisconnectTime=60000 log4j.appender.LemaAppender.ReconnectionDelay=5000 log4j.appender.LemaAppender.ConnectionLostStrategy=InMemoryBuffer
Parameters
Parameter | Description | Type | Default |
Application | the application's unique identifier | String | DefaultApplication |
EnvironmentId | the id of the application's environment; for example 1 = production, 2 = staging, 3 = test, 4 = development. | int | 1 |
RemoteHost | address of the lema-server | String | 127.0.0.1 |
Port | the port where the lema-server listens | int | 50233 |
Threshold | log4j Threshold (for instance INFO) | String | |
ReconnectionDelay | positive integer representing the number of milliseconds to wait between each failed connection attempt to the server. | int | 15000 |
LocationInfo | if "true"the information sent to the server will include location information | boolean | true |
ApplicationVersion | if set the application's version ist send to the server | String | |
Hostname | if set the client's hostname is send to the server | String | |
AppendExtraInfo | if "true" addional information (f.e. max. Heapsize, classpath) is send to the server | boolean | true |
SendeBeacon | if set the client sends a beacon every 90-120 seconds | boolean | true |
ConnectionLostStrategy | This options says what should be done in case of a brocken connection. Possible values are: OnlyDrop - simply drop the event DropAndSendInfo - drop the event and report this to the server when the connection is reastablished InMemoryBuffer |
String | |
ConnectOnDemand | when "true" the client only connects if there are logevents to send; if there are no more logevents the connection is closed after <ConnectOnDemandDisconnectTime> when "false" the client establishes a connection right at the start |
boolean | false |
ConnectOnDemandDisconnectTime | in milliseconds; if there are no more logevents the connection is closed after this time | int | 60000 |