Skip to content

Commit 54a162e

Browse files
committed
docs: add logging to README.md
1 parent bdd1a2f commit 54a162e

1 file changed

Lines changed: 42 additions & 1 deletion

File tree

README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Tools like [Lombok](https://projectlombok.org/) are used to reduce boilerplate c
2525
- [Spring Data JPA](https://spring.io/projects/spring-data-jpa) as ORM
2626
- [PostgreSQL](https://www.postgresql.org/) as DBMS
2727
- [Lombok](https://projectlombok.org/) for boilerplate code reduction
28+
- [Log4j 2](https://logging.apache.org/log4j/2.x/) for logging
2829
- Unit testing:
2930
- [JUnit](https://junit.org/junit5/) as testing framework
3031
- [AssertJ](https://assertj.github.io/doc/) for assertions
@@ -132,7 +133,7 @@ The following are lists of conventions that either *should* be followed or *must
132133
- [equals()/hashCode()](https://projectlombok.org/features/EqualsAndHashCode)
133134
- [Constructors](https://projectlombok.org/features/constructor)
134135
- [Builders](https://projectlombok.org/features/Builder) including with [inheritance](https://projectlombok.org/features/experimental/SuperBuilder)
135-
- [Loggers](https://projectlombok.org/features/log)
136+
- [Loggers](https://projectlombok.org/features/log): preferred is `@Log4j2`
136137
- [Utilities](https://projectlombok.org/features/experimental/UtilityClass)
137138
- [Exceptions](https://projectlombok.org/features/experimental/StandardException)
138139
- Can be used to set access levels of methods ([Getters/Setters](https://projectlombok.org/features/GetterSetter) and [Constructors](https://projectlombok.org/features/constructor))
@@ -149,3 +150,43 @@ The following are lists of conventions that either *should* be followed or *must
149150
- features: `feature/<ticket-number>_<short-description>`
150151
- bugs: `bugfix/<ticket-number>_<short-description>`
151152
- Commit messages are written according to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
153+
154+
### Logging
155+
with [Log4j 2](https://logging.apache.org/log4j/2.x/)
156+
157+
<table>
158+
<thead>
159+
<tr>
160+
<th>Level</th>
161+
<th>Usage</th>
162+
</tr>
163+
</thead>
164+
<tbody>
165+
<tr>
166+
<td>Trace</td>
167+
<td>Trace events are used for extremely fine-grained diagnostic information, which can be helpful for tracking down very specific issues or understanding the detailed flow of a program.</td>
168+
</tr>
169+
<tr>
170+
<td>Debug</td>
171+
<td>Debug is used for internal system events that are not necessarily observable from the outside, but useful when determining how something happened.</td>
172+
</tr>
173+
<tr>
174+
<td>Info</td>
175+
<td>Information events describe things happening in the system that correspond to its responsibilities and functions.</td>
176+
</tr>
177+
<tr>
178+
<td>Warn</td>
179+
<td>When service is degraded, endangered, or maybe behaving outside its expected parameters, Warning-level events are used.</td>
180+
</tr>
181+
<tr>
182+
<td>Error</td>
183+
<td>When functionality is unavailable or expectations are broken, an Error event is used.</td>
184+
</tr>
185+
<tr>
186+
<td>Fatal</td>
187+
<td>The most critical level, Fatal events demand immediate attention.</td>
188+
</tr>
189+
</tbody>
190+
</table>
191+
192+
Usage guidelines are taken from [here](https://github.com/solid-stack-solutions/voycar-backend/blob/main/README.md#logging).

0 commit comments

Comments
 (0)