Skip to content

Commit

Permalink
Disable logging for now
Browse files Browse the repository at this point in the history
  • Loading branch information
mikera committed Aug 27, 2024
1 parent ba1e2a4 commit 6c9a572
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 2 additions & 0 deletions convex-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- Don't really want this by default?
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
Expand All @@ -172,5 +173,6 @@
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
-->
</dependencies>
</project>
16 changes: 8 additions & 8 deletions convex-cli/src/main/java/convex/cli/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.event.Level;

import ch.qos.logback.classic.Level;
import convex.cli.account.Account;
import convex.cli.client.Query;
import convex.cli.client.Status;
Expand Down Expand Up @@ -141,18 +141,18 @@ public int mainExecute(String[] args) {
}

private void setupVerbosity() {
Level[] verboseLevels = { Level.OFF, Level.WARN, Level.INFO, Level.DEBUG, Level.TRACE, Level.ALL };
Level[] verboseLevels = { Level.ERROR, Level.WARN, Level.INFO, Level.DEBUG, Level.TRACE, Level.TRACE };

if (verbose == null)
verbose = 0;
if (verbose >= 0 && verbose < verboseLevels.length) {
// Set root logger level?
try {
ch.qos.logback.classic.Logger root = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
root.setLevel(verboseLevels[verbose]);
} catch (Exception e) {
informWarning("Failed to set verbosity level: "+e.getMessage());
}
// try {
// ch.qos.logback.classic.Logger root = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
// root.setLevel(verboseLevels[verbose]);
// } catch (Exception e) {
// informWarning("Failed to set verbosity level: "+e.getMessage());
// }
} else {
throw new CLIError(ExitCodes.USAGE,"Invalid verbosity level: " + verbose);
}
Expand Down
1 change: 0 additions & 1 deletion convex-integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jmh.version>1.37</jmh.version>
<junit.version>5.10.2</junit.version>
<slf4j.version>2.0.9</slf4j.version>
<slf4j.version>2.0.13</slf4j.version>
<hc.version>5.3</hc.version>
<convex.version>${project.version}</convex.version>
<!--Freeze this for reproducible builds. -->
Expand Down

0 comments on commit 6c9a572

Please sign in to comment.