Got rid of some warnings.
This commit is contained in:
parent
077cb2ee21
commit
f296c6fe26
|
@ -5,24 +5,26 @@ import _ from 'lodash';
|
||||||
export type LoggingFunction = (...args: any[]) => void;
|
export type LoggingFunction = (...args: any[]) => void;
|
||||||
|
|
||||||
const noopTaggedLogger: TaggedLogger = {
|
const noopTaggedLogger: TaggedLogger = {
|
||||||
log(level: LogLevel, ...args: any[]): void {},
|
log(_level: LogLevel, ..._args: any[]): void {},
|
||||||
debug(...args: any[]): void {},
|
debug(..._args: any[]): void {},
|
||||||
info(...args: any[]): void {},
|
info(..._args: any[]): void {},
|
||||||
warn(...args: any[]): void {},
|
warn(..._args: any[]): void {},
|
||||||
error(...args: any[]): void {},
|
error(..._args: any[]): void {},
|
||||||
profile(...args: any[]): void {},
|
profile(..._args: any[]): void {},
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface ActivatableLogger extends Logger {
|
export interface ActivatableLogger extends Logger {
|
||||||
init(enabled: boolean, loggingFunction?: LoggingFunction): void;
|
init(enabled: boolean, loggingFunction?: LoggingFunction): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO: Check if LoggingConfig.debug and LoggingConfig.profile are handled.
|
||||||
|
*/
|
||||||
export class ActivatableLoggerImpl implements ActivatableLogger {
|
export class ActivatableLoggerImpl implements ActivatableLogger {
|
||||||
private enabled: boolean = false;
|
private enabled: boolean = false;
|
||||||
private loggingFunction: LoggingFunction = console.info;
|
private loggingFunction: LoggingFunction = console.info;
|
||||||
|
|
||||||
init(enabled: boolean, loggingFunction?: LoggingFunction): void {
|
init(enabled: boolean, loggingFunction?: LoggingFunction): void {
|
||||||
const config = require('./config').config;
|
|
||||||
this.enabled = enabled;
|
this.enabled = enabled;
|
||||||
this.loggingFunction = loggingFunction || console.info;
|
this.loggingFunction = loggingFunction || console.info;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// ATTENTION: Those constraints are no longer the same file as for the client / admin interface.
|
// ATTENTION: Those constraints are no longer the same file as for the client / admin interface.
|
||||||
// Make sure changes are also reflected in /shared/validation/constraints.js.
|
// Make sure changes are also reflected in /shared/validation/constraints.js.
|
||||||
|
|
||||||
|
// noinspection RegExpSimplifiable
|
||||||
const CONSTRAINTS = {
|
const CONSTRAINTS = {
|
||||||
id:{
|
id:{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
|
Loading…
Reference in a new issue