Skip to content

Commit

Permalink
loader: add env varible to disable ansi. close #69
Browse files Browse the repository at this point in the history
  • Loading branch information
PeratX committed Mar 26, 2022
1 parent e2398e8 commit 98a211b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ $ chmod +x mcl
$ ./mcl
```

### 禁用控制台颜色

配置`mcl.disable-ansi`环境变量为`true`

```bash
$ java "-Dmcl.disable-ansi=true" -jar mcl.jar
```

## `Mirai Repo` 列表

* [iTXTech](https://repo.itxtech.org) - **默认** - Cloudflare Pages
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/itxtech/mcl/Loader.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ public static void main(String[] args) {
var loader = new Loader();
try {
loader.loadConfig();
loader.detectLogger();
if (!"true".equals(System.getProperties().getProperty("mcl.disable-ansi"))) {
loader.detectLogger();
}
loader.start(args);
} catch (Exception e) {
loader.logger.logException(e);
Expand Down

0 comments on commit 98a211b

Please sign in to comment.