Skip to content

kewang/logback-http-appender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logback-http-appender

Build Status

How to use

<appender name="STASH" class="com.uppoints.logback.http.appender.HttpAuthenticationAppender">
				<protocol>https</protocol>
				<url>localhost</url>
				<port>443</port>
				<path>/logs/logstash</path>
				<authentication>
					<username>username</username>
					<password>senha</password>
				</authentication>
				<reconnectDelay>10</reconnectDelay>
				
				<encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">        
					<providers>
						<mdc/> <!-- MDC variables on the Thread will be written as JSON fields--> 
						<context/> <!--Outputs entries from logback's context -->                               
						<version/> <!-- Logstash json format version, the @version field in the output-->
						<logLevel/>
						<loggerName/>
						<pattern>
							<pattern> <!-- we can add some custom fields to be sent with all the log entries make filtering easier in Logstash   -->               
								{
								"appName": "upp-quality-control-framework-ws"	<!--or searching with Kibana-->
								}
							</pattern>
						</pattern>
		
						<threadName/>
						<message/>
						
						<logstashMarkers/> <!-- Useful so we can add extra information for specific log lines as Markers--> 
						<arguments/> <!--or through StructuredArguments-->
						
						<stackTrace/>
					</providers>
				</encoder>
			</appender>

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages