mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
normalize use of .info (INFO) instead of .succ (DONE) logging
This commit is contained in:
parent
8e30744bb9
commit
e9eaafae41
13 changed files with 27 additions and 27 deletions
|
@ -74,7 +74,7 @@ export async function masterMain() {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
bootLogger.succ('Sharkey initialized');
|
bootLogger.info('Sharkey initialized');
|
||||||
|
|
||||||
if (config.sentryForBackend) {
|
if (config.sentryForBackend) {
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
|
@ -140,10 +140,10 @@ export async function masterMain() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (envOption.onlyQueue) {
|
if (envOption.onlyQueue) {
|
||||||
bootLogger.succ('Queue started', null, true);
|
bootLogger.info('Queue started', null, true);
|
||||||
} else {
|
} else {
|
||||||
const addressString = net.isIPv6(config.address) ? `[${config.address}]` : config.address;
|
const addressString = net.isIPv6(config.address) ? `[${config.address}]` : config.address;
|
||||||
bootLogger.succ(config.socket ? `Now listening on socket ${config.socket} on ${config.url}` : `Now listening on ${addressString}:${config.port} on ${config.url}`, null, true);
|
bootLogger.info(config.socket ? `Now listening on socket ${config.socket} on ${config.url}` : `Now listening on ${addressString}:${config.port} on ${config.url}`, null, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ function loadConfigBoot(): Config {
|
||||||
throw exception;
|
throw exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
configLogger.succ('Loaded');
|
configLogger.info('Loaded');
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ async function connectDb(): Promise<void> {
|
||||||
dbLogger.info('Connecting...');
|
dbLogger.info('Connecting...');
|
||||||
await initDb();
|
await initDb();
|
||||||
const v = await db.query('SHOW server_version').then(x => x[0].server_version);
|
const v = await db.query('SHOW server_version').then(x => x[0].server_version);
|
||||||
dbLogger.succ(`Connected: v${v}`);
|
dbLogger.info(`Connected: v${v}`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
dbLogger.error('Cannot connect', null, true);
|
dbLogger.error('Cannot connect', null, true);
|
||||||
dbLogger.error(err);
|
dbLogger.error(err);
|
||||||
|
@ -211,7 +211,7 @@ async function spawnWorkers(limit = 1) {
|
||||||
|
|
||||||
bootLogger.info(`Starting ${workers} worker${workers === 1 ? '' : 's'}...`);
|
bootLogger.info(`Starting ${workers} worker${workers === 1 ? '' : 's'}...`);
|
||||||
await Promise.all([...Array(workers)].map(spawnWorker));
|
await Promise.all([...Array(workers)].map(spawnWorker));
|
||||||
bootLogger.succ('All workers started');
|
bootLogger.info('All workers started');
|
||||||
}
|
}
|
||||||
|
|
||||||
function spawnWorker(): Promise<void> {
|
function spawnWorker(): Promise<void> {
|
||||||
|
|
|
@ -129,7 +129,7 @@ export class FetchInstanceMetadataService {
|
||||||
|
|
||||||
await this.federatedInstanceService.update(instance.id, updates);
|
await this.federatedInstanceService.update(instance.id, updates);
|
||||||
|
|
||||||
this.logger.succ(`Successfully updated metadata of ${instance.host}`);
|
this.logger.info(`Successfully updated metadata of ${instance.host}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.logger.error(`Failed to update metadata of ${instance.host}: ${renderInlineError(e)}`);
|
this.logger.error(`Failed to update metadata of ${instance.host}: ${renderInlineError(e)}`);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -106,7 +106,7 @@ export class RemoteUserResolveService {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.succ(`Corrected URI for ${acctLower} from ${user.uri} to ${self.href}`);
|
this.logger.info(`Corrected URI for ${acctLower} from ${user.uri} to ${self.href}`);
|
||||||
|
|
||||||
await this.apPersonService.updatePerson(self.href);
|
await this.apPersonService.updatePerson(self.href);
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,6 @@ export class AggregateRetentionProcessorService {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.succ('Retention aggregated.');
|
this.logger.info('Retention aggregated.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,6 @@ export class BakeBufferedReactionsProcessorService {
|
||||||
|
|
||||||
await this.reactionsBufferingService.bake();
|
await this.reactionsBufferingService.bake();
|
||||||
|
|
||||||
this.logger.succ('All buffered reactions baked.');
|
this.logger.info('All buffered reactions baked.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,6 @@ export class CheckExpiredMutingsProcessorService {
|
||||||
await this.userMutingService.unmute(expired);
|
await this.userMutingService.unmute(expired);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.succ('All expired mutings checked.');
|
this.logger.info('All expired mutings checked.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,6 @@ export class CleanChartsProcessorService {
|
||||||
await this.perUserDriveChart.clean();
|
await this.perUserDriveChart.clean();
|
||||||
await this.apRequestChart.clean();
|
await this.apRequestChart.clean();
|
||||||
|
|
||||||
this.logger.succ('All charts successfully cleaned.');
|
this.logger.info('All charts successfully cleaned.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,6 @@ export class CleanProcessorService {
|
||||||
|
|
||||||
this.reversiService.cleanOutdatedGames();
|
this.reversiService.cleanOutdatedGames();
|
||||||
|
|
||||||
this.logger.succ('Cleaned.');
|
this.logger.info('Cleaned.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,6 +75,6 @@ export class CleanRemoteFilesProcessorService {
|
||||||
await job.updateProgress(100 / total * deletedCount);
|
await job.updateProgress(100 / total * deletedCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.succ(`All cached remote files processed. Total deleted: ${deletedCount}, Failed: ${errorCount}.`);
|
this.logger.info(`All cached remote files processed. Total deleted: ${deletedCount}, Failed: ${errorCount}.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,7 @@ export class DeleteAccountProcessorService {
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.logger.succ('All clips have been deleted.');
|
this.logger.info('All clips have been deleted.');
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // Delete favorites
|
{ // Delete favorites
|
||||||
|
@ -136,7 +136,7 @@ export class DeleteAccountProcessorService {
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.logger.succ('All favorites have been deleted.');
|
this.logger.info('All favorites have been deleted.');
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // Delete user relations
|
{ // Delete user relations
|
||||||
|
@ -172,7 +172,7 @@ export class DeleteAccountProcessorService {
|
||||||
muteeId: user.id,
|
muteeId: user.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.logger.succ('All user relations have been deleted.');
|
this.logger.info('All user relations have been deleted.');
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // Delete reactions
|
{ // Delete reactions
|
||||||
|
@ -206,7 +206,7 @@ export class DeleteAccountProcessorService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.succ('All reactions have been deleted');
|
this.logger.info('All reactions have been deleted');
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // Poll votes
|
{ // Poll votes
|
||||||
|
@ -238,7 +238,7 @@ export class DeleteAccountProcessorService {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.succ('All poll votes have been deleted');
|
this.logger.info('All poll votes have been deleted');
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // Delete scheduled notes
|
{ // Delete scheduled notes
|
||||||
|
@ -254,7 +254,7 @@ export class DeleteAccountProcessorService {
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.logger.succ('All scheduled notes deleted');
|
this.logger.info('All scheduled notes deleted');
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // Delete notes
|
{ // Delete notes
|
||||||
|
@ -312,7 +312,7 @@ export class DeleteAccountProcessorService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.succ('All of notes deleted');
|
this.logger.info('All of notes deleted');
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // Delete files
|
{ // Delete files
|
||||||
|
@ -341,7 +341,7 @@ export class DeleteAccountProcessorService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.succ('All of files deleted');
|
this.logger.info('All of files deleted');
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // Delete actor logs
|
{ // Delete actor logs
|
||||||
|
@ -353,7 +353,7 @@ export class DeleteAccountProcessorService {
|
||||||
await this.apLogService.deleteInboxLogs(user.id)
|
await this.apLogService.deleteInboxLogs(user.id)
|
||||||
.catch(err => this.logger.error(err, `Failed to delete AP logs for user '${user.uri}'`));
|
.catch(err => this.logger.error(err, `Failed to delete AP logs for user '${user.uri}'`));
|
||||||
|
|
||||||
this.logger.succ('All AP logs deleted');
|
this.logger.info('All AP logs deleted');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do this BEFORE deleting the account!
|
// Do this BEFORE deleting the account!
|
||||||
|
@ -379,7 +379,7 @@ export class DeleteAccountProcessorService {
|
||||||
await this.usersRepository.delete(user.id);
|
await this.usersRepository.delete(user.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.succ('Account data deleted');
|
this.logger.info('Account data deleted');
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // Send email notification
|
{ // Send email notification
|
||||||
|
|
|
@ -74,6 +74,6 @@ export class DeleteDriveFilesProcessorService {
|
||||||
job.updateProgress(deletedCount / total);
|
job.updateProgress(deletedCount / total);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.succ(`All drive files (${deletedCount}) of ${user.id} has been deleted.`);
|
this.logger.info(`All drive files (${deletedCount}) of ${user.id} has been deleted.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,6 @@ export class ResyncChartsProcessorService {
|
||||||
await this.notesChart.resync();
|
await this.notesChart.resync();
|
||||||
await this.usersChart.resync();
|
await this.usersChart.resync();
|
||||||
|
|
||||||
this.logger.succ('All charts successfully resynced.');
|
this.logger.info('All charts successfully resynced.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,6 @@ export class TickChartsProcessorService {
|
||||||
await this.perUserDriveChart.tick(false);
|
await this.perUserDriveChart.tick(false);
|
||||||
await this.apRequestChart.tick(false);
|
await this.apRequestChart.tick(false);
|
||||||
|
|
||||||
this.logger.succ('All charts successfully ticked.');
|
this.logger.info('All charts successfully ticked.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue