Add trace log level, traceCall decorator and use in webgl
- New 'trace' log level in the API, you should expect very spammy logs when trace is on and filter them down. As opposed to 'debug' which should be more readable. - traceCall decorator logs the args and return value of the decorated method. Wecan use this on key functions in various parts of the code to assist debugging issues that are hard to reproduce such as #4665. - Decorated a few webgl render methods for #4665. - There's an early exit in traceCall when not on the trace log level so the runtime impact when not in trace is negligable. Part of #4665
This commit is contained in:
@@ -104,6 +104,7 @@ export class MockCoreService implements ICoreService {
|
||||
export class MockLogService implements ILogService {
|
||||
public serviceBrand: any;
|
||||
public logLevel = LogLevelEnum.DEBUG;
|
||||
public trace(message: any, ...optionalParams: any[]): void { }
|
||||
public debug(message: any, ...optionalParams: any[]): void { }
|
||||
public info(message: any, ...optionalParams: any[]): void { }
|
||||
public warn(message: any, ...optionalParams: any[]): void { }
|
||||
|
||||
Reference in New Issue
Block a user