mirror of
https://github.com/CaramelFur/Picsur.git
synced 2025-11-12 14:55:39 +01:00
reconsider logging levels
This commit is contained in:
@@ -47,14 +47,14 @@ export class MainAuthGuard extends AuthGuard(['jwt', 'guest']) {
|
||||
// These are the permissions required to access the route
|
||||
const permissions = this.extractPermissions(context);
|
||||
if (HasFailed(permissions)) {
|
||||
this.logger.warn('Route Permissions: ' + permissions.getReason());
|
||||
this.logger.error('Fetching route permission failed: ' + permissions.getReason());
|
||||
throw new InternalServerErrorException();
|
||||
}
|
||||
|
||||
// These are the permissions the user has
|
||||
const userPermissions = await this.usersService.getPermissions(user.id);
|
||||
if (HasFailed(userPermissions)) {
|
||||
this.logger.warn('User Permissions: ' + userPermissions.getReason());
|
||||
this.logger.warn('Fetching user permissions failed: ' + userPermissions.getReason());
|
||||
throw new InternalServerErrorException();
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export class DemoManagerModule implements OnModuleInit, OnModuleDestroy {
|
||||
|
||||
async onModuleInit() {
|
||||
if (this.hostConfigService.isDemo()) {
|
||||
this.logger.log('Demo mode enabled');
|
||||
this.logger.warn('Demo mode enabled, images are ephimeral');
|
||||
await this.setupDemoMode();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ export class DemoManagerService {
|
||||
|
||||
public async setupRoles() {
|
||||
this.logger.warn(
|
||||
'Modifying roles for demo mode, this will not be reverted automatically',
|
||||
'Modifying roles for demo mode, this will have to be reverted manually',
|
||||
);
|
||||
// Could be done manually, but this makes settup up a demo instance quicker
|
||||
this.rolesService.addPermissions('guest', [Permission.ImageUpload]);
|
||||
@@ -25,7 +25,7 @@ export class DemoManagerService {
|
||||
}
|
||||
|
||||
private async executeAsync() {
|
||||
this.logger.debug('Executing demo cleanup');
|
||||
this.logger.verbose('Executing demo cleanup');
|
||||
await this.imagesService.deleteAll(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user