diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b01728b..1879a9e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [2.18.0] - 2022-08-18 + +- Adds `LOG_LEVEL` enum, and changes `initFileLogging` interface function to accept a log level. + ## [2.17.0] - 2022-08-10 - Adds `getUserIdMappingForSuperTokensIds` to the UserIdMapping Interface diff --git a/build.gradle b/build.gradle index 2ccc2150..81dccd1f 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java-library' } -version = "2.17.0" +version = "2.18.0" repositories { mavenCentral() diff --git a/src/main/java/io/supertokens/pluginInterface/LOG_LEVEL.java b/src/main/java/io/supertokens/pluginInterface/LOG_LEVEL.java new file mode 100644 index 00000000..c53c1578 --- /dev/null +++ b/src/main/java/io/supertokens/pluginInterface/LOG_LEVEL.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2020, VRAI Labs and/or its affiliates. All rights reserved. + * + * This software is licensed under the Apache License, Version 2.0 (the + * "License") as published by the Apache Software Foundation. + * + * You may not use this file except in compliance with the License. You may + * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + */ + +package io.supertokens.pluginInterface; + +public enum LOG_LEVEL { + NONE, DEBUG, INFO, WARN, ERROR +} diff --git a/src/main/java/io/supertokens/pluginInterface/Storage.java b/src/main/java/io/supertokens/pluginInterface/Storage.java index 754f9590..2eb896a4 100644 --- a/src/main/java/io/supertokens/pluginInterface/Storage.java +++ b/src/main/java/io/supertokens/pluginInterface/Storage.java @@ -19,12 +19,14 @@ import io.supertokens.pluginInterface.exceptions.StorageQueryException; +import java.util.Set; + public interface Storage { // if silent is true, do not log anything out on the console void constructor(String processId, boolean silent); - void loadConfig(String configFilePath); + void loadConfig(String configFilePath, Set logLevels); void initFileLogging(String infoLogPath, String errorLogPath);