mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 05:05:53 +00:00
Fix verbose logging
This commit is contained in:
parent
123a45bb21
commit
4995129afa
@ -69,7 +69,7 @@ export default class AccountController {
|
|||||||
if (!user) {
|
if (!user) {
|
||||||
// There's a small chance we'll get a validation error because of:
|
// There's a small chance we'll get a validation error because of:
|
||||||
// https://github.com/vector-im/riot-web/issues/5846
|
// https://github.com/vector-im/riot-web/issues/5846
|
||||||
LogService.verbose("AccountController", "User " + mxUserId + " never seen before - creating");
|
LogService.debug("AccountController", "User " + mxUserId + " never seen before - creating");
|
||||||
await User.create({userId: mxUserId});
|
await User.create({userId: mxUserId});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ export class DimensionWidgetService {
|
|||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
LogService.verbose("DimensionWidgetService", response.body);
|
LogService.debug("DimensionWidgetService", response.body);
|
||||||
return reject(new ApiError(400, "Non-success status code returned"));
|
return reject(new ApiError(400, "Non-success status code returned"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -22,7 +22,7 @@ export class MatrixAppServiceApiService {
|
|||||||
const appservice = await AppserviceStore.getByHomeserverToken(homeserverToken);
|
const appservice = await AppserviceStore.getByHomeserverToken(homeserverToken);
|
||||||
|
|
||||||
// We don't handle the transaction at all - we just don't want the homeserver to consider us down
|
// We don't handle the transaction at all - we just don't want the homeserver to consider us down
|
||||||
LogService.verbose("MatrixAppServiceApiService", "Accepting transaction " + txnId + " for appservice " + appservice.id + " blindly");
|
LogService.debug("MatrixAppServiceApiService", "Accepting transaction " + txnId + " for appservice " + appservice.id + " blindly");
|
||||||
return {}; // 200 OK
|
return {}; // 200 OK
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
LogService.error("MatrixAppServiceApiService", err);
|
LogService.error("MatrixAppServiceApiService", err);
|
||||||
@ -37,7 +37,7 @@ export class MatrixAppServiceApiService {
|
|||||||
const appservice = await AppserviceStore.getByHomeserverToken(homeserverToken);
|
const appservice = await AppserviceStore.getByHomeserverToken(homeserverToken);
|
||||||
|
|
||||||
// We don't support room lookups
|
// We don't support room lookups
|
||||||
LogService.verbose("MatrixAppServiceApiService", "404ing request for room " + roomAlias + " at appservice " + appservice.id);
|
LogService.debug("MatrixAppServiceApiService", "404ing request for room " + roomAlias + " at appservice " + appservice.id);
|
||||||
throw new ApiError(404, {errcode: "IO.T2BOT.DIMENSION.ROOMS_NOT_SUPPORTED"});
|
throw new ApiError(404, {errcode: "IO.T2BOT.DIMENSION.ROOMS_NOT_SUPPORTED"});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof ApiError) throw err;
|
if (err instanceof ApiError) throw err;
|
||||||
|
@ -36,7 +36,7 @@ class _DimensionStore {
|
|||||||
constructor() {
|
constructor() {
|
||||||
if (process.env.DATABASE_URI || config.database.uri ) {
|
if (process.env.DATABASE_URI || config.database.uri ) {
|
||||||
this.sequelize = new Sequelize(process.env.DATABASE_URI || config.database.uri , {
|
this.sequelize = new Sequelize(process.env.DATABASE_URI || config.database.uri , {
|
||||||
logging: i => LogService.verbose("DimensionStore [SQL]", i)
|
logging: i => LogService.debug("DimensionStore [SQL]", i)
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.sequelize = new Sequelize({
|
this.sequelize = new Sequelize({
|
||||||
@ -45,7 +45,7 @@ class _DimensionStore {
|
|||||||
storage: process.env['DIMENSION_DB_PATH'] || config.database.file,
|
storage: process.env['DIMENSION_DB_PATH'] || config.database.file,
|
||||||
username: "",
|
username: "",
|
||||||
password: "",
|
password: "",
|
||||||
logging: i => LogService.verbose("DimensionStore [SQL]", i)
|
logging: i => LogService.debug("DimensionStore [SQL]", i)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.sequelize.addModels([
|
this.sequelize.addModels([
|
||||||
|
@ -18,7 +18,7 @@ export async function getFederationConnInfo(serverName: string): Promise<IFedera
|
|||||||
// Check to see if we've cached the hostname at all already
|
// Check to see if we've cached the hostname at all already
|
||||||
const cachedUrl = Cache.for(CACHE_FEDERATION).get(serverName);
|
const cachedUrl = Cache.for(CACHE_FEDERATION).get(serverName);
|
||||||
if (cachedUrl) {
|
if (cachedUrl) {
|
||||||
LogService.verbose("matrix", "Cached federation URL for " + serverName + " is " + cachedUrl.url);
|
LogService.debug("matrix", "Cached federation URL for " + serverName + " is " + cachedUrl.url);
|
||||||
return cachedUrl;
|
return cachedUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user