|
24 | 24 | import io.supertokens.Main;
|
25 | 25 | import io.supertokens.ResourceDistributor;
|
26 | 26 | import io.supertokens.config.Config;
|
27 |
| -import io.supertokens.pluginInterface.multitenancy.exceptions.TenantOrAppNotFoundException; |
28 | 27 | import io.supertokens.pluginInterface.LOG_LEVEL;
|
29 | 28 | import io.supertokens.pluginInterface.Storage;
|
30 | 29 | import io.supertokens.pluginInterface.multitenancy.TenantIdentifier;
|
| 30 | +import io.supertokens.pluginInterface.multitenancy.exceptions.TenantOrAppNotFoundException; |
31 | 31 | import io.supertokens.storageLayer.StorageLayer;
|
32 | 32 | import io.supertokens.utils.Utils;
|
33 | 33 | import io.supertokens.webserver.Webserver;
|
@@ -174,7 +174,8 @@ public static void error(Main main, TenantIdentifier tenantIdentifier, String er
|
174 | 174 | }
|
175 | 175 | }
|
176 | 176 |
|
177 |
| - public static void error(Main main, TenantIdentifier tenantIdentifier, String message, boolean toConsoleAsWell, Exception e) { |
| 177 | + public static void error(Main main, TenantIdentifier tenantIdentifier, String message, boolean toConsoleAsWell, |
| 178 | + Exception e) { |
178 | 179 | try {
|
179 | 180 | if (!Config.getConfig(new TenantIdentifier(null, null, null), main).getLogLevels(main)
|
180 | 181 | .contains(LOG_LEVEL.ERROR)) {
|
@@ -220,6 +221,10 @@ public static void stopLogging(Main main) {
|
220 | 221 | if (getInstance(main) == null) {
|
221 | 222 | return;
|
222 | 223 | }
|
| 224 | + getInstance(main).infoLogger.getLoggerContext().stop(); |
| 225 | + getInstance(main).errorLogger.getLoggerContext().stop(); |
| 226 | + getInstance(main).infoLogger.getLoggerContext().getStatusManager().clear(); |
| 227 | + getInstance(main).errorLogger.getLoggerContext().getStatusManager().clear(); |
223 | 228 | getInstance(main).infoLogger.detachAndStopAllAppenders();
|
224 | 229 | getInstance(main).errorLogger.detachAndStopAllAppenders();
|
225 | 230 | Webserver.getInstance(main).closeLogger();
|
|
0 commit comments