Skip to content

Commit 21a800d

Browse files
committed
TerminalConsoleAppender 1.3.0
1 parent c8cd166 commit 21a800d

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

README.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ application itself:
2222
1. Add a dependency on TerminalConsoleAppender:
2323

2424
```
25-
net.minecrell:terminalconsoleappender:1.2.0
25+
net.minecrell:terminalconsoleappender:1.3.0
2626
```
2727
2828
If you package all dependencies into a single JAR file, ensure that all transitive dependencies are included:
@@ -40,7 +40,7 @@ application itself:
4040
4141
| | [Jansi] | [JNA] |
4242
| ---: | ------ | ------- |
43-
| **Dependencies** | `org.jline:jline-terminal-jansi:3.12.1` | `org.jline:jline-terminal-jna:3.12.1` |
43+
| **Dependencies** | `org.jline:jline-terminal-jansi:3.20.0` | `org.jline:jline-terminal-jna:3.20.0` |
4444
| | (`org.fusesource.jansi:jansi`) | (`net.java.dev.jna:jna`) |
4545
| **Size** | ~280KB | ~1400KB |
4646
@@ -122,12 +122,13 @@ JLine will automatically render ANSI color escape codes in supported terminals u
122122
To use them, you need to instruct Log4j to insert them into log messages:
123123

124124
- You can use the [patterns included in Log4j](https://logging.apache.org/log4j/2.x/manual/layouts.html#Patterns)
125-
in your `PatternLayout`, e.g. `%highlight` or `%style`. It is recommended to use the `noConsoleNoAnsi` option for
126-
`PatternLayout` to omit them in unsupported environments:
125+
in your `PatternLayout`, e.g. `%highlight` or `%style`. It is recommended to use the `disableAnsi` option
126+
together with the `${tca:disableAnsi}` variable. This will ensure that ANSI colors are disabled automatically in
127+
unsupported environments or with the system properties mentioned above:
127128

128129
```xml
129130
<TerminalConsole>
130-
<PatternLayout noConsoleNoAnsi="true" pattern="%highlight{[%d{HH:mm:ss} %level]: %msg%n%xEx}"/>
131+
<PatternLayout pattern="%highlight{[%d{HH:mm:ss} %level]: %msg%n%xEx}" disableAnsi="${tca:disableAnsi}"/>
131132
</TerminalConsole>
132133
```
133134

@@ -160,6 +161,10 @@ To use them, you need to instruct Log4j to insert them into log messages:
160161
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %minecraftFormatting{%msg}{strip}%n"/>
161162
</TerminalConsole>
162163
```
164+
165+
**NOTE:** The MinecraftFormattingConverter is deprecated and may be removed in future versions of
166+
TerminalConsoleAppender. There are no plans to extend it with new features like RGB color codes.
167+
Please see [issue #18](https://github.com/Minecrell/TerminalConsoleAppender/issues/18) for details.
163168

164169
[Log4j2 Appender]: https://logging.apache.org/log4j/2.x/manual/appenders.html
165170
[JLine 3 Terminal]: https://github.com/jline/jline3

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=net.minecrell
22
name=TerminalConsoleAppender
3-
version=1.3.0-SNAPSHOT
3+
version=1.3.0
44
description=JLine 3 appender for Log4j2, allows extending command line apps using colors and command completion
55
url=https://github.com/Minecrell/TerminalConsoleAppender

0 commit comments

Comments
 (0)