You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+5-3
Original file line number
Diff line number
Diff line change
@@ -23,11 +23,13 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
23
23
### Changed
24
24
25
25
- 'Get full text' now also checks the file url. [#568](https://github.com/koppor/jabref/issues/568)
26
-
-JabRef writes a new backup file only if there is a change. Before, JabRef created a backup upon start. [#9679](https://github.com/JabRef/jabref/pull/9679)
26
+
-We modified the `Add Group` dialog to use the most recently selected group hierarchical context. [#9141](https://github.com/JabRef/jabref/issues/9141)
27
27
- We refined the 'main directory not found' error message. [#9625](https://github.com/JabRef/jabref/pull/9625)
28
-
-We streamlined the paths for logs and backups: The parent path fragement is always `logs` or `backups`.
28
+
-JabRef writes a new backup file only if there is a change. Before, JabRef created a backup upon start. [#9679](https://github.com/JabRef/jabref/pull/9679)
29
29
- Backups of libraries are not stored per JabRef version, but collected together.
30
-
- We modified the `Add Group` dialog to use the most recently selected group hierarchical context [#9141](https://github.com/JabRef/jabref/issues/9141)
30
+
- We streamlined the paths for logs and backups: The parent path fragement is always `logs` or `backups`.
31
+
-`log.txt` now contains debug messages. Debugging needs to be enabled explicitly. [#9678](https://github.com/JabRef/jabref/pull/9678)
32
+
-`log.txt` does not contain entries for non-found files during PDF indexing. [#9678](https://github.com/JabRef/jabref/pull/9678)
31
33
- We improved the Medline importer to correctly import ISO dates for `revised`. [#9536](https://github.com/JabRef/jabref/issues/9536)
Copy file name to clipboardexpand all lines: docs/code-howtos/logging.md
+37-13
Original file line number
Diff line number
Diff line change
@@ -5,20 +5,44 @@ parent: Code Howtos
5
5
6
6
JabRef uses the logging facade [SLF4j](https://www.slf4j.org). All log messages are passed internally to [tinylog](https://tinylog.org/v2/) which handles any filtering, formatting and writing of log messages.
*If the logging event is caused by an exception, please add the exception to the log message as:
14
+
Please always use `LOGGER.debug` for debugging.
15
15
16
-
```java
17
-
catch (SomeException e) {
18
-
LOGGER.warn("Warning text.", e);
19
-
...
20
-
}
21
-
```
16
+
Example:
17
+
18
+
```java
19
+
String example ="example";
20
+
LOGGER.debug("Some state {}", example);
21
+
```
22
+
23
+
Enable logging in `tinylog.properties`:
24
+
25
+
```properties
26
+
level@org.jabref.example.ExampleClass = debug
27
+
```
28
+
29
+
If the logging event is caused by an exception, please add the exception to the log message as:
30
+
31
+
```java
32
+
catch (SomeException e) {
33
+
LOGGER.warn("Warning text.", e);
34
+
...
35
+
}
36
+
```
37
+
38
+
When running tests, `tinylog-test.properties` is used.
39
+
It is located under `src/test/resources`. As default, only `info` is logged.
40
+
When developing, it makes sense to use `debug` as log level.
41
+
One can change the log level per class using the pattern `level@class=debug` is set to `debug`.
42
+
In the `.properties` file, this is done for `org.jabref.model.entry.BibEntry`.
43
+
44
+
## Further reading
45
+
46
+
SLF4J also support parameterized logging, e.g. if you want to print out multiple arguments in a log statement use a pair of curly braces (`{}`).
47
+
Head to <https://www.slf4j.org/faq.html#logging_performance> for examples.
22
48
23
-
*SLF4J also support parameterized logging, e.g. if you want to print out multiple arguments in a log statement use a pair of curly braces. [Examples](https://www.slf4j.org/faq.html#logging\_performance)
24
-
*When running tests, `tinylog-test.properties` is used. It is located under `src/test/resources`.Asdefault, only `info` is logged. When developing, it makes sense to use `debug` as log level. One can change the log level per classusing the pattern `level@class=debug` is set to `debug`. In the `.properties` file, this is done for `org.jabref.model.entry.BibEntry`.
0 commit comments