|
1 | 1 | # Java Logging Support for Cloud Foundry
|
2 | 2 |
|
3 |
| -[](https://travis-ci.org/SAP/cf-java-logging-support)[](https://api.reuse.software/info/github.com/SAP/cf-java-logging-support) |
| 3 | +[](https://travis-ci.org/SAP/cf-java-logging-support) |
| 4 | +[](https://api.reuse.software/info/github.com/SAP/cf-java-logging-support) |
4 | 5 |
|
5 | 6 | ## Summary
|
6 | 7 |
|
7 |
| -This is a collection of support libraries for Java applications running on Cloud Foundry that serves three main purposes: It provides (a) means to emit *structured application log messages*, (b) instrument parts of your application stack to *collect request metrics* and (c) java clients for producing *custom metrics*. |
| 8 | +This is a collection of support libraries for Java applications (Java 8 and above) running on Cloud Foundry that serves three main purposes: It provides (a) means to emit *structured application log messages*, (b) instrument parts of your application stack to *collect request metrics* and (c) java clients for producing *custom metrics*. |
8 | 9 |
|
9 | 10 | When we say structured, we actually mean in JSON format. In that sense, it shares ideas with [logstash-logback-encoder](https://github.com/logstash/logstash-logback-encoder) (and a first internal version was actually based on it), but takes a simpler approach as we want to ensure that these structured messages adhere to standardized formats. With such standardized formats in place, it becomes much easier to ingest, process and search such messages in log analysis stacks such as [ELK](https://www.elastic.co/webinars/introduction-elk-stack).
|
10 | 11 |
|
11 | 12 | If you're interested in the specifications of these standardized formats, you may want to have a closer look at the `fields.yml` files in the [beats folder](./cf-java-logging-support-core/beats).
|
12 | 13 |
|
13 |
| -While [logstash-logback-encoder](https://github.com/logstash/logstash-logback-encoder) is tied to [logback](http://logback.qos.ch/), we've tried to keep implementation neutral and have implemented the core functionality on top of [slf4j](http://www.slf4j.org/), but provided implementations for both [logback](http://logback.qos.ch/) and [log4j2](http://logging.apache.org/log4j/2.x/) (and we're open to contributions that would support other implementations). |
| 14 | +While [logstash-logback-encoder](https://github.com/logstash/logstash-logback-encoder) is tied to [logback](http://logback.qos.ch/), we've tried to keep implementation neutral and have implemented the core functionality on top of [slf4j](http://www.slf4j.org/), but provided implementations for both [logback](http://logback.qos.ch/) and [log4j2](http://logging.apache.org/log4j/2.x/) (and we're open to contributions that would support other implementations). |
14 | 15 |
|
15 | 16 | The instrumentation part is currently focusing on providing [request filters for Java Servlets](http://www.oracle.com/technetwork/java/filters-137243.html) and [client and server filters for Jersey](https://jersey.java.net/documentation/latest/filters-and-interceptors.html), but again, we're open to contributions for other APIs and frameworks.
|
16 | 17 |
|
@@ -73,7 +74,6 @@ If you want to use the `custom metrics`, just define the following dependency:
|
73 | 74 | </dependency>
|
74 | 75 | ```
|
75 | 76 |
|
76 |
| - |
77 | 77 | ## Implementation variants and logging configurations
|
78 | 78 |
|
79 | 79 | The *core* feature (on which all other features rely) is just using the `org.slf4j` API, but to actually get logs written, you need to pick an implementation feature. As stated above, we have two implementations:
|
@@ -209,7 +209,7 @@ public class DemoController {
|
209 | 209 | private LongTaskTimer longTimer;
|
210 | 210 |
|
211 | 211 | DemoController() {
|
212 |
| - this.counter = Metrics.counter("demo.contoller.number.of.requests", "unit", "requests"); |
| 212 | + this.counter = Metrics.counter("demo.controller.number.of.requests", "unit", "requests"); |
213 | 213 | List<Tag> tags = new ArrayList<Tag>(Arrays.asList(new Tag[] { Tag.of("parallel", "clients") }));
|
214 | 214 | this.concurrentHttpRequests = Metrics.gauge("demo.controller.number.of.clients.being.served", tags,
|
215 | 215 | new AtomicInteger(0));
|
@@ -311,8 +311,12 @@ Stacktraces can be logged within one log message. Further details can be found
|
311 | 311 |
|
312 | 312 | In order to illustrate how the different features are used, this repository includes two sample applications:
|
313 | 313 | * a Jersey implementation in the [./sample folder](./sample)
|
314 |
| - * a Spring Boot implementaiton in the [./sample-spring-boot folder](./sample-spring-boot) |
| 314 | + * a Spring Boot implementation in the [./sample-spring-boot folder](./sample-spring-boot) |
315 | 315 |
|
316 | 316 | ## Documentation
|
317 | 317 |
|
318 | 318 | More info on the actual implementation can be found in the [Wiki](https://github.com/SAP/cf-java-logging-support/wiki).
|
| 319 | + |
| 320 | +## Licensing |
| 321 | + |
| 322 | +Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the [REUSE](https://api.reuse.software/info/github.com/SAP/cf-java-logging-support) tool. |
0 commit comments