This is an automated email from the ASF dual-hosted git repository.

pkarwasz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j-samples.git


The following commit(s) were added to refs/heads/main by this push:
     new b886122  Add a minimal documentation
b886122 is described below

commit b8861220593c73fa28f00cfa1e58cb6ee266b493
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Sat Feb 18 00:31:14 2023 +0100

    Add a minimal documentation
---
 README.adoc                                        | 62 ++++++++++++++++++++++
 log4j-samples-configuration/README.adoc            | 33 ++++++++++++
 log4j-samples-flume-embedded/README.adoc           | 20 ++++++-
 log4j-samples-flume-remote/README.adoc             | 23 ++++++--
 log4j-samples-loggerProperties/README.adoc         | 34 ++++++++++++
 .../README.md                                      |  2 +-
 6 files changed, 167 insertions(+), 7 deletions(-)

diff --git a/README.adoc b/README.adoc
new file mode 100644
index 0000000..52bfa02
--- /dev/null
+++ b/README.adoc
@@ -0,0 +1,62 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+    https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+////
+= Apache Log4j Sample
+
+This repository contains several examples to help the user with some of the 
more advanced Log4j2 features.
+
+xref:log4j-samples-configuration/README.adoc[`log4j-samples-configuration`]::
+Explains how to use a custom programmatic configuration,
+
+xref:log4j-samples-flume-embedded/README.adoc[`log4j-samples-flume-embedded`]::
+Explains how to use an embedded Flume agent to send logs to 
https://flume.apache.org[Apache Flume],
+
+xref:log4j-samples-flume-remote/README.adoc[`log4j-samples-flume-embedded`]::
+Explains how to send logs to https://flume.apache.org[Apache Flume],
+
+xref:log4j-samples-loggerProperties/README.adoc[`log4j-samples-loggerProperties`]::
+Explains how to write a custom property lookup,
+
+xref:log4j-spring-cloud-config-sample-application/README.md[`log4j-spring-cloud-config-sample-application`]::
+An example of Spring Boot application that reads its logging configuration 
from a Spring Cloud Configuration Server.
+
+== Build
+
+This project generates Java 8 bytecode, though requires Java 11 for 
compilation.
+You can build and test sources using `./mvnw verify` command.
+
+== Distribution
+
+The artifacts in this repository are available only in source form.
+
+== Support
+
+You can use GitHub Issues for feature requests and bug reports.
+
+To ask questions:
+
+* use the mailto:[email protected][the Log4j user mailing list],
+* or post a question on 
https://stackoverflow.com/questions/tagged/log4j2[StackOverflow] and mark it 
with a `log4j2` tag.
+
+== License
+
+Licensed to the Apache Software Foundation (ASF) under one or more contributor 
license agreements.
+See xref:NOTICE.txt[] distributed with this work for additional information 
regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0 (the 
"License"); you may not use this file except in compliance with the License.
+You may obtain a copy of the License at 
https://www.apache.org/licenses/LICENSE-2.0[].
+
+Unless required by applicable law or agreed to in writing, software 
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and 
limitations under the License.
diff --git a/log4j-samples-configuration/README.adoc 
b/log4j-samples-configuration/README.adoc
new file mode 100644
index 0000000..fbc9a9c
--- /dev/null
+++ b/log4j-samples-configuration/README.adoc
@@ -0,0 +1,33 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+    https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+////
+= Apache Log4j Samples: custom configuration
+
+This project shows how to write a custom configuration factory.
+
+In order to use it:
+. install the artifact and its parent locally with `mvn install`,
+. add it to your Maven project:
++
+[xml]
+----
+<dependency>
+  <groupId>org.apache.logging.log4j.samples</groupId>
+  <artifactId>log4j-samples-configuration</artifactId>
+  <version>2.19.1-SNAPSHOT</version>
+</dependency>
+----
+. add an empty `log4j2.custom` file to your project's resources.
diff --git a/log4j-samples-flume-embedded/README.adoc 
b/log4j-samples-flume-embedded/README.adoc
index f61b29b..0678677 100644
--- a/log4j-samples-flume-embedded/README.adoc
+++ b/log4j-samples-flume-embedded/README.adoc
@@ -1,4 +1,20 @@
-== Sample to connect to a Flume Agent (via FlumeAppender/Avro)
+////
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+    https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+////
+= Apache Log4j Samples: embedded Flume Agent
 
 This sample uses the classes in the sample flume-common project. It will 
randomly pick from the events defined there
 and send them to Flume. At the same time it will intermix some random 
non-audit events.
@@ -38,4 +54,4 @@ an exception will be thrown for each event that occurs while 
the agent is down.
 appender will automatically reconnect.
 
 The output from the Flume agent will include the generated Flume events. Since 
the events are sent individually
-Avro will print the full event and Flume will print a hex dump of the first 
few bytes of the event.
\ No newline at end of file
+Avro will print the full event and Flume will print a hex dump of the first 
few bytes of the event.
diff --git a/log4j-samples-flume-remote/README.adoc 
b/log4j-samples-flume-remote/README.adoc
index f61b29b..789a64f 100644
--- a/log4j-samples-flume-remote/README.adoc
+++ b/log4j-samples-flume-remote/README.adoc
@@ -1,7 +1,22 @@
-== Sample to connect to a Flume Agent (via FlumeAppender/Avro)
+////
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
 
-This sample uses the classes in the sample flume-common project. It will 
randomly pick from the events defined there
-and send them to Flume. At the same time it will intermix some random 
non-audit events.
+    https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+////
+= Apache Log4j Samples: connect to a Flume agent via Avro
+
+This sample uses the classes in the sample 
link:../log4j-samples-flume-common[log4j-samples-flume-common] project. It will 
randomly pick from the events defined there and send them to Flume. At the same 
time it will intermix some random non-audit events.
 
 To run this sample:
 . Run `mvn install` on the `log4j-samples-flume-common` project.
@@ -38,4 +53,4 @@ an exception will be thrown for each event that occurs while 
the agent is down.
 appender will automatically reconnect.
 
 The output from the Flume agent will include the generated Flume events. Since 
the events are sent individually
-Avro will print the full event and Flume will print a hex dump of the first 
few bytes of the event.
\ No newline at end of file
+Avro will print the full event and Flume will print a hex dump of the first 
few bytes of the event.
diff --git a/log4j-samples-loggerProperties/README.adoc 
b/log4j-samples-loggerProperties/README.adoc
new file mode 100644
index 0000000..43db85c
--- /dev/null
+++ b/log4j-samples-loggerProperties/README.adoc
@@ -0,0 +1,34 @@
+////
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+    https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+////
+= Apache Log4j Samples: custom lookups
+
+This project shows how to write a custom lookup.
+
+In order to use it:
+. install the artifact and its parent locally with `mvn install`,
+. add it to your Maven project:
++
+[xml]
+----
+<dependency>
+  <groupId>org.apache.logging.log4j.samples</groupId>
+  <artifactId>log4j-samples-loggerProperties</artifactId>
+  <version>2.19.1-SNAPSHOT</version>
+</dependency>
+----
+. use `$${custom:some_key}` in the pattern of your pattern layout,
+. in your code assign some properties to a logger using 
`CustomLookup#setLoggerProperties`.
diff --git a/log4j-spring-cloud-config-sample-application/README.md 
b/log4j-spring-cloud-config-sample-application/README.md
index 686be3a..d1afa8f 100644
--- a/log4j-spring-cloud-config-sample-application/README.md
+++ b/log4j-spring-cloud-config-sample-application/README.md
@@ -1,4 +1,4 @@
-# Log4j Spring Cloud Sample Application
+# Log4j Samples: Spring Cloud Sample Application
 
 This application uses Spring Boot and reads the logging configuration from the 
companion Spring Cloud Config Server
 project. The log4j2.xml file is located in the config-repo directory in that 
project.

Reply via email to