Skip to content
Snippets Groups Projects

Resolve "Refactor debug messages from System.out to SLF4J"

Merged René Schöne requested to merge 46-refactor-debug-messages-from-system-out-to-slf4j into dev
12 files
+ 158
76
Compare changes
  • Side-by-side
  • Inline
Files
12
  • 8c125c74
    working slf4j debug messages · 8c125c74
    René Schöne authored
    - made handlers to templates so that inside variable content is possible
    - refactored every System.out and System.err message to variable method, currently either sout/serr or slf4j
    - added config parameter to Compiler, with console being default
    - updated docu
    - todo: update preprocessor-testing to not require handler-jadds as input anymore
+ 15
4
@@ -4,7 +4,7 @@ The compiler is JastAdd-compliant, i.e., it accepts all flags available for Jast
Additional options are as follows.
| Name | Required (Default) | Description |
|-|-|-|
|---|---|---|
| `--rootNode` | Yes | Root node in the base grammar. |
| `--protocols` | No (`mqtt`) | Protocols to enable, currently available: `mqtt, rest`. |
| `--printYaml` | No (false) | Print out YAML instead of generating files. |
@@ -12,14 +12,15 @@ Additional options are as follows.
| `--logReads` | No (false) | Enable logging for every received message. |
| `--logWrites` | No (false) | Enable logging for every sent message. |
| `--logIncremental` | No (false) | Enable logging for observer in incremental dependency tracking. |
| `--loggingTarget` | No (`console`) | Logging target to use, currently available: `console, slf4j`. |
| `--experimental-jastadd-329` | No (false) | Use trace events `INC_FLUSH_START` and `INC_FLUSH_END` ([JastAdd issue #329][jastadd-issue-329]), see [section about automatic dependency tracking](/using#dependency-tracking-automatically-derived). |
| `--incremental` | No (false) | Enables incremental dependency tracking (if `trace` is also set appropriately). |
| `--trace[=flush]` | No (false) | Enables incremental dependency tracking (if `incremental` is also set appropriately). |
| `--version` | No (false) | Print version info and exit (reused JastAdd option) |
| `--o` | No (`.`) | Output directory (reused JastAdd option) |
All files to be process have to be passed as arguments.
Their type is decided by the file extension (`ast` and `relast` for input grammars, `connect` and `ragconnect` for RagConnect definitions file).
All files to be processed have to be passed as arguments.
Their type is deduced by the file extension (`ast` and `relast` for input grammars, `connect` and `ragconnect` for RagConnect definitions file).
# Additional software dependencies
@@ -52,7 +53,7 @@ However, depending on the selected protocols and/or used features, additional de
- Additional remarks:
- Host is always `localhost`.
- Might work with newer versions of `com.sparkjava.spark-core` as well.
- For debugging, it is beneficial to include an implementation for [SLF4J](http://www.slf4j.org/).
- For debugging, it is beneficial to include an implementation for [SLF4J][slf4j].
## Used features
@@ -91,5 +92,15 @@ However, depending on the selected protocols and/or used features, additional de
- Remarks:
- [Feature description](/using#an-advanced-example)
### Logging Target SLF4J
- Condition: When using `--loggingTarget=slf4j` to RagConnect
- Required runtime dependencies:
- `group: 'org.slf4j', name: 'slf4j-api', version: '1.7.0'`
- Required options for RelAST compiler: _none_
- Required options for JastAdd: _none_
- Remarks:
- Additionally, a slf4j binding is required, see [the slf4j user manual][slf4j]
[jastadd-issue-329]: https://bitbucket.org/jastadd/jastadd2/issues/329/add-event-for-completion-of-flush
[slf4j]: https://www.slf4j.org/manual.html
Loading