1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

Adding server timing to measure performance (default value: false) #437

This commit is contained in:
Patrik J. Braun 2022-02-26 12:34:04 +01:00
parent 2543fd9301
commit c6640ce0f4
11 changed files with 116 additions and 2 deletions

View File

@ -18,10 +18,12 @@ import {VideoProcessing} from '../model/fileprocessing/VideoProcessing';
import {SearchQueryDTO, SearchQueryTypes} from '../../common/entities/SearchQueryDTO'; import {SearchQueryDTO, SearchQueryTypes} from '../../common/entities/SearchQueryDTO';
import {LocationLookupException} from '../exceptions/LocationLookupException'; import {LocationLookupException} from '../exceptions/LocationLookupException';
import {SupportedFormats} from '../../common/SupportedFormats'; import {SupportedFormats} from '../../common/SupportedFormats';
import {ServerTime} from './ServerTimingMWs';
export class GalleryMWs { export class GalleryMWs {
@ServerTime('1.db', 'List Directory')
public static async listDirectory(req: Request, res: Response, next: NextFunction): Promise<any> { public static async listDirectory(req: Request, res: Response, next: NextFunction): Promise<any> {
const directoryName = req.params.directory || '/'; const directoryName = req.params.directory || '/';
const absoluteDirectoryName = path.join(ProjectPath.ImageFolder, directoryName); const absoluteDirectoryName = path.join(ProjectPath.ImageFolder, directoryName);
@ -57,6 +59,7 @@ export class GalleryMWs {
} }
} }
@ServerTime('1.zip', 'Zip Directory')
public static async zipDirectory(req: Request, res: Response, next: NextFunction): Promise<any> { public static async zipDirectory(req: Request, res: Response, next: NextFunction): Promise<any> {
if (Config.Client.Other.enableDownloadZip === false) { if (Config.Client.Other.enableDownloadZip === false) {
return next(); return next();
@ -108,6 +111,7 @@ export class GalleryMWs {
} }
} }
@ServerTime('3.cleanUp', 'Clean up')
public static cleanUpGalleryResults(req: Request, res: Response, next: NextFunction): any { public static cleanUpGalleryResults(req: Request, res: Response, next: NextFunction): any {
if (!req.resultPipe) { if (!req.resultPipe) {
return next(); return next();
@ -203,6 +207,7 @@ export class GalleryMWs {
} }
@ServerTime('1.db', 'Search')
public static async search(req: Request, res: Response, next: NextFunction): Promise<any> { public static async search(req: Request, res: Response, next: NextFunction): Promise<any> {
if (Config.Client.Search.enabled === false || !(req.params.searchQueryDTO)) { if (Config.Client.Search.enabled === false || !(req.params.searchQueryDTO)) {
return next(); return next();
@ -225,6 +230,7 @@ export class GalleryMWs {
} }
@ServerTime('1.db', 'Autocomplete')
public static async autocomplete(req: Request, res: Response, next: NextFunction): Promise<any> { public static async autocomplete(req: Request, res: Response, next: NextFunction): Promise<any> {
if (Config.Client.Search.AutoComplete.enabled === false) { if (Config.Client.Search.AutoComplete.enabled === false) {
return next(); return next();

View File

@ -0,0 +1,60 @@
import {NextFunction, Request, Response} from 'express';
import {Config} from '../../common/config/private/Config';
export class ServerTimeEntry {
public name: string;
startHR: any;
public endTime: number = null;
constructor(name: string) {
this.name = name;
}
public start(): void {
this.startHR = process.hrtime();
}
public end(): void {
const duration = process.hrtime(this.startHR);
this.endTime = (duration[0] * 1E3) + (duration[1] * 1e-6);
}
}
export const ServerTime = (id: string, name: string) => {
return (target: any, propertyName: string, descriptor: TypedPropertyDescriptor<any>): any => {
if (Config.Server.Log.logServerTiming === false) {
return;
}
const m = descriptor.value;
descriptor.value = (req: Request, res: Response, next: NextFunction) => {
req.timing = req.timing || {};
req.timing[id] = new ServerTimeEntry(name);
req.timing[id].start();
m(req, res, (err?: any) => {
req.timing[id].end();
next(err);
});
};
};
};
export class ServerTimingMWs {
/**
* Add server timing
*/
public static async addServerTiming(req: Request, res: Response, next: NextFunction): Promise<any> {
if (Config.Server.Log.logServerTiming === false || !req.timing) {
next();
}
const l = Object.entries(req.timing).filter(e => e[1].endTime).map(e => `${e[0]};dur=${e[1].endTime};desc="${e[1].name}"`);
res.header('Server-Timing', l.join(', '));
next();
}
}

View File

@ -10,9 +10,12 @@ import {ThumbnailSourceType} from '../../model/threading/PhotoWorker';
import {MediaDTO} from '../../../common/entities/MediaDTO'; import {MediaDTO} from '../../../common/entities/MediaDTO';
import {PhotoProcessing} from '../../model/fileprocessing/PhotoProcessing'; import {PhotoProcessing} from '../../model/fileprocessing/PhotoProcessing';
import {PersonWithSampleRegion} from '../../../common/entities/PersonDTO'; import {PersonWithSampleRegion} from '../../../common/entities/PersonDTO';
import {ServerTime} from '../ServerTimingMWs';
export class ThumbnailGeneratorMWs { export class ThumbnailGeneratorMWs {
@ServerTime('2.th', 'Thumbnail decoration')
public static async addThumbnailInformation(req: Request, res: Response, next: NextFunction): Promise<any> { public static async addThumbnailInformation(req: Request, res: Response, next: NextFunction): Promise<any> {
if (!req.resultPipe) { if (!req.resultPipe) {
return next(); return next();

View File

@ -4,6 +4,7 @@ import {RenderingMWs} from '../middlewares/RenderingMWs';
import {UserRoles} from '../../common/entities/UserDTO'; import {UserRoles} from '../../common/entities/UserDTO';
import {VersionMWs} from '../middlewares/VersionMWs'; import {VersionMWs} from '../middlewares/VersionMWs';
import {AlbumMWs} from '../middlewares/AlbumMWs'; import {AlbumMWs} from '../middlewares/AlbumMWs';
import {ServerTimingMWs} from '../middlewares/ServerTimingMWs';
export class AlbumRouter { export class AlbumRouter {
public static route(app: Express): void { public static route(app: Express): void {
@ -23,6 +24,7 @@ export class AlbumRouter {
// specific part // specific part
AlbumMWs.listAlbums, AlbumMWs.listAlbums,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderResult RenderingMWs.renderResult
); );
} }
@ -36,6 +38,7 @@ export class AlbumRouter {
// specific part // specific part
AlbumMWs.deleteAlbum, AlbumMWs.deleteAlbum,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderResult RenderingMWs.renderResult
); );
} }
@ -49,6 +52,7 @@ export class AlbumRouter {
// specific part // specific part
AlbumMWs.createSavedSearch, AlbumMWs.createSavedSearch,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderResult RenderingMWs.renderResult
); );
} }

View File

@ -8,6 +8,7 @@ import {ThumbnailSourceType} from '../model/threading/PhotoWorker';
import {VersionMWs} from '../middlewares/VersionMWs'; import {VersionMWs} from '../middlewares/VersionMWs';
import {SupportedFormats} from '../../common/SupportedFormats'; import {SupportedFormats} from '../../common/SupportedFormats';
import {PhotoConverterMWs} from '../middlewares/thumbnail/PhotoConverterMWs'; import {PhotoConverterMWs} from '../middlewares/thumbnail/PhotoConverterMWs';
import {ServerTimingMWs} from '../middlewares/ServerTimingMWs';
export class GalleryRouter { export class GalleryRouter {
public static route(app: Express): void { public static route(app: Express): void {
@ -41,6 +42,7 @@ export class GalleryRouter {
GalleryMWs.listDirectory, GalleryMWs.listDirectory,
ThumbnailGeneratorMWs.addThumbnailInformation, ThumbnailGeneratorMWs.addThumbnailInformation,
GalleryMWs.cleanUpGalleryResults, GalleryMWs.cleanUpGalleryResults,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderResult RenderingMWs.renderResult
); );
} }
@ -53,6 +55,7 @@ export class GalleryRouter {
AuthenticationMWs.authorisePath('directory', true), AuthenticationMWs.authorisePath('directory', true),
// specific part // specific part
ServerTimingMWs.addServerTiming,
GalleryMWs.zipDirectory GalleryMWs.zipDirectory
); );
} }
@ -66,6 +69,7 @@ export class GalleryRouter {
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
@ -80,6 +84,7 @@ export class GalleryRouter {
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
PhotoConverterMWs.convertPhoto, PhotoConverterMWs.convertPhoto,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
@ -93,6 +98,7 @@ export class GalleryRouter {
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
@ -107,6 +113,7 @@ export class GalleryRouter {
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
GalleryMWs.loadBestFitVideo, GalleryMWs.loadBestFitVideo,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
@ -120,6 +127,7 @@ export class GalleryRouter {
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
@ -134,6 +142,7 @@ export class GalleryRouter {
// specific part // specific part
GalleryMWs.getRandomImage, GalleryMWs.getRandomImage,
GalleryMWs.loadFile, GalleryMWs.loadFile,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
@ -148,6 +157,7 @@ export class GalleryRouter {
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
ThumbnailGeneratorMWs.generateThumbnailFactory(ThumbnailSourceType.Photo), ThumbnailGeneratorMWs.generateThumbnailFactory(ThumbnailSourceType.Photo),
ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
@ -162,6 +172,7 @@ export class GalleryRouter {
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
ThumbnailGeneratorMWs.generateThumbnailFactory(ThumbnailSourceType.Video), ThumbnailGeneratorMWs.generateThumbnailFactory(ThumbnailSourceType.Video),
ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
@ -177,6 +188,7 @@ export class GalleryRouter {
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
ThumbnailGeneratorMWs.generateIconFactory(ThumbnailSourceType.Video), ThumbnailGeneratorMWs.generateIconFactory(ThumbnailSourceType.Video),
ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
@ -191,6 +203,7 @@ export class GalleryRouter {
// specific part // specific part
GalleryMWs.loadFile, GalleryMWs.loadFile,
ThumbnailGeneratorMWs.generateIconFactory(ThumbnailSourceType.Photo), ThumbnailGeneratorMWs.generateIconFactory(ThumbnailSourceType.Photo),
ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }
@ -206,6 +219,7 @@ export class GalleryRouter {
GalleryMWs.search, GalleryMWs.search,
ThumbnailGeneratorMWs.addThumbnailInformation, ThumbnailGeneratorMWs.addThumbnailInformation,
GalleryMWs.cleanUpGalleryResults, GalleryMWs.cleanUpGalleryResults,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderResult RenderingMWs.renderResult
); );
} }
@ -220,6 +234,7 @@ export class GalleryRouter {
// specific part // specific part
GalleryMWs.autocomplete, GalleryMWs.autocomplete,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderResult RenderingMWs.renderResult
); );
} }

View File

@ -4,6 +4,7 @@ import {RenderingMWs} from '../middlewares/RenderingMWs';
import {NotificationMWs} from '../middlewares/NotificationMWs'; import {NotificationMWs} from '../middlewares/NotificationMWs';
import {Express} from 'express'; import {Express} from 'express';
import {VersionMWs} from '../middlewares/VersionMWs'; import {VersionMWs} from '../middlewares/VersionMWs';
import {ServerTimingMWs} from '../middlewares/ServerTimingMWs';
export class NotificationRouter { export class NotificationRouter {
public static route(app: Express): void { public static route(app: Express): void {
@ -17,6 +18,7 @@ export class NotificationRouter {
AuthenticationMWs.authorise(UserRoles.Guest), AuthenticationMWs.authorise(UserRoles.Guest),
VersionMWs.injectGalleryVersion, VersionMWs.injectGalleryVersion,
NotificationMWs.list, NotificationMWs.list,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderResult RenderingMWs.renderResult
); );
} }

View File

@ -6,6 +6,7 @@ import {PersonMWs} from '../middlewares/PersonMWs';
import {ThumbnailGeneratorMWs} from '../middlewares/thumbnail/ThumbnailGeneratorMWs'; import {ThumbnailGeneratorMWs} from '../middlewares/thumbnail/ThumbnailGeneratorMWs';
import {VersionMWs} from '../middlewares/VersionMWs'; import {VersionMWs} from '../middlewares/VersionMWs';
import {Config} from '../../common/config/private/Config'; import {Config} from '../../common/config/private/Config';
import {ServerTimingMWs} from '../middlewares/ServerTimingMWs';
export class PersonRouter { export class PersonRouter {
public static route(app: Express): void { public static route(app: Express): void {
@ -25,6 +26,7 @@ export class PersonRouter {
// specific part // specific part
PersonMWs.updatePerson, PersonMWs.updatePerson,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderResult RenderingMWs.renderResult
); );
} }
@ -41,6 +43,7 @@ export class PersonRouter {
// PersonMWs.addSamplePhotoForAll, // PersonMWs.addSamplePhotoForAll,
ThumbnailGeneratorMWs.addThumbnailInfoForPersons, ThumbnailGeneratorMWs.addThumbnailInfoForPersons,
PersonMWs.cleanUpPersonResults, PersonMWs.cleanUpPersonResults,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderResult RenderingMWs.renderResult
); );
} }
@ -55,6 +58,7 @@ export class PersonRouter {
// specific part // specific part
PersonMWs.getPerson, PersonMWs.getPerson,
ThumbnailGeneratorMWs.generatePersonThumbnail, ThumbnailGeneratorMWs.generatePersonThumbnail,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderFile RenderingMWs.renderFile
); );
} }

View File

@ -8,6 +8,7 @@ import {AuthenticationMWs} from '../middlewares/user/AuthenticationMWs';
import {CookieNames} from '../../common/CookieNames'; import {CookieNames} from '../../common/CookieNames';
import {ErrorCodes, ErrorDTO} from '../../common/entities/Error'; import {ErrorCodes, ErrorDTO} from '../../common/entities/Error';
import {UserDTO} from '../../common/entities/UserDTO'; import {UserDTO} from '../../common/entities/UserDTO';
import {ServerTimeEntry} from '../middlewares/ServerTimingMWs';
declare global { declare global {
namespace Express { namespace Express {
@ -15,6 +16,7 @@ declare global {
locale?: string; locale?: string;
localePath?: string; localePath?: string;
tpl?: any; tpl?: any;
timing?: { [key: string]: ServerTimeEntry } ;
} }
interface Response { interface Response {
@ -92,13 +94,13 @@ export class PublicRouter {
}); });
app.get('/heartbeat', app.get('/heartbeat',
(req: Request, res: Response, next: NextFunction) => { (req: Request, res: Response) => {
res.sendStatus(200); res.sendStatus(200);
} }
); );
app.get('/manifest.json', app.get('/manifest.json',
(req: Request, res: Response, next: NextFunction) => { (req: Request, res: Response) => {
res.send({ res.send({
name: Config.Client.applicationTitle, name: Config.Client.applicationTitle,
icons: [ icons: [

View File

@ -4,6 +4,7 @@ import {RenderingMWs} from '../middlewares/RenderingMWs';
import {SharingMWs} from '../middlewares/SharingMWs'; import {SharingMWs} from '../middlewares/SharingMWs';
import * as express from 'express'; import * as express from 'express';
import {QueryParams} from '../../common/QueryParams'; import {QueryParams} from '../../common/QueryParams';
import {ServerTimingMWs} from '../middlewares/ServerTimingMWs';
export class SharingRouter { export class SharingRouter {
public static route(app: express.Express): void { public static route(app: express.Express): void {
@ -20,6 +21,7 @@ export class SharingRouter {
app.post('/api/share/login', app.post('/api/share/login',
AuthenticationMWs.inverseAuthenticate, AuthenticationMWs.inverseAuthenticate,
AuthenticationMWs.shareLogin, AuthenticationMWs.shareLogin,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderSessionUser RenderingMWs.renderSessionUser
); );
} }
@ -29,6 +31,7 @@ export class SharingRouter {
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.authorise(UserRoles.LimitedGuest), AuthenticationMWs.authorise(UserRoles.LimitedGuest),
SharingMWs.getSharing, SharingMWs.getSharing,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderSharing RenderingMWs.renderSharing
); );
} }
@ -38,6 +41,7 @@ export class SharingRouter {
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.authorise(UserRoles.User), AuthenticationMWs.authorise(UserRoles.User),
SharingMWs.createSharing, SharingMWs.createSharing,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderSharing RenderingMWs.renderSharing
); );
} }
@ -47,6 +51,7 @@ export class SharingRouter {
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.authorise(UserRoles.User), AuthenticationMWs.authorise(UserRoles.User),
SharingMWs.updateSharing, SharingMWs.updateSharing,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderSharing RenderingMWs.renderSharing
); );
} }
@ -57,6 +62,7 @@ export class SharingRouter {
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.authorise(UserRoles.Admin), AuthenticationMWs.authorise(UserRoles.Admin),
SharingMWs.deleteSharing, SharingMWs.deleteSharing,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderResult RenderingMWs.renderResult
); );
} }
@ -66,6 +72,7 @@ export class SharingRouter {
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.authorise(UserRoles.User), AuthenticationMWs.authorise(UserRoles.User),
SharingMWs.listSharing, SharingMWs.listSharing,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderSharingList RenderingMWs.renderSharingList
); );
} }

View File

@ -4,6 +4,7 @@ import {UserRoles} from '../../common/entities/UserDTO';
import {AuthenticationMWs} from '../middlewares/user/AuthenticationMWs'; import {AuthenticationMWs} from '../middlewares/user/AuthenticationMWs';
import {UserRequestConstrainsMWs} from '../middlewares/user/UserRequestConstrainsMWs'; import {UserRequestConstrainsMWs} from '../middlewares/user/UserRequestConstrainsMWs';
import {RenderingMWs} from '../middlewares/RenderingMWs'; import {RenderingMWs} from '../middlewares/RenderingMWs';
import {ServerTimingMWs} from '../middlewares/ServerTimingMWs';
export class UserRouter { export class UserRouter {
public static route(app: Express): void { public static route(app: Express): void {
@ -23,6 +24,7 @@ export class UserRouter {
app.post('/api/user/login', app.post('/api/user/login',
AuthenticationMWs.inverseAuthenticate, AuthenticationMWs.inverseAuthenticate,
AuthenticationMWs.login, AuthenticationMWs.login,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderSessionUser RenderingMWs.renderSessionUser
); );
} }
@ -30,6 +32,7 @@ export class UserRouter {
private static addLogout(app: Express): void { private static addLogout(app: Express): void {
app.post('/api/user/logout', app.post('/api/user/logout',
AuthenticationMWs.logout, AuthenticationMWs.logout,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderOK RenderingMWs.renderOK
); );
} }
@ -38,6 +41,7 @@ export class UserRouter {
private static addGetSessionUser(app: Express): void { private static addGetSessionUser(app: Express): void {
app.get('/api/user/me', app.get('/api/user/me',
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderSessionUser RenderingMWs.renderSessionUser
); );
} }
@ -48,6 +52,7 @@ export class UserRouter {
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
UserRequestConstrainsMWs.forceSelfRequest, UserRequestConstrainsMWs.forceSelfRequest,
UserMWs.changePassword, UserMWs.changePassword,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderOK RenderingMWs.renderOK
); );
} }
@ -58,6 +63,7 @@ export class UserRouter {
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.authorise(UserRoles.Admin), AuthenticationMWs.authorise(UserRoles.Admin),
UserMWs.createUser, UserMWs.createUser,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderOK RenderingMWs.renderOK
); );
} }
@ -68,6 +74,7 @@ export class UserRouter {
AuthenticationMWs.authorise(UserRoles.Admin), AuthenticationMWs.authorise(UserRoles.Admin),
UserRequestConstrainsMWs.notSelfRequest, UserRequestConstrainsMWs.notSelfRequest,
UserMWs.deleteUser, UserMWs.deleteUser,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderOK RenderingMWs.renderOK
); );
} }
@ -78,6 +85,7 @@ export class UserRouter {
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.authorise(UserRoles.Admin), AuthenticationMWs.authorise(UserRoles.Admin),
UserMWs.listUsers, UserMWs.listUsers,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderResult RenderingMWs.renderResult
); );
} }
@ -88,6 +96,7 @@ export class UserRouter {
AuthenticationMWs.authorise(UserRoles.Admin), AuthenticationMWs.authorise(UserRoles.Admin),
UserRequestConstrainsMWs.notSelfRequestOr2Admins, UserRequestConstrainsMWs.notSelfRequestOr2Admins,
UserMWs.changeRole, UserMWs.changeRole,
ServerTimingMWs.addServerTiming,
RenderingMWs.renderOK RenderingMWs.renderOK
); );
} }

View File

@ -161,6 +161,8 @@ export class ServerLogConfig {
level: LogLevel = LogLevel.info; level: LogLevel = LogLevel.info;
@ConfigProperty({type: SQLLogLevel}) @ConfigProperty({type: SQLLogLevel})
sqlLevel: SQLLogLevel = SQLLogLevel.error; sqlLevel: SQLLogLevel = SQLLogLevel.error;
@ConfigProperty()
logServerTiming: boolean = false;
} }