badmfck-api-server 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -43,7 +43,7 @@ async function Initializer(services) {
43
43
  exports.Initializer = Initializer;
44
44
  class APIService extends BaseService_1.BaseService {
45
45
  static nextLogID = 0;
46
- version = "1.4.1";
46
+ version = "1.4.2";
47
47
  options;
48
48
  netLog = [];
49
49
  constructor(options) {
@@ -17,6 +17,7 @@ export interface ILogItem {
17
17
  export interface ILogServiceOptions {
18
18
  output?: (data?: any) => void;
19
19
  stackSize: number;
20
+ level: LOG_LEVEL;
20
21
  }
21
22
  export declare const getDefaultLogOptions: () => ILogServiceOptions;
22
23
  export declare const logInfo: (message: any, ...optional: any[]) => void;
@@ -36,7 +36,8 @@ var LOG_LEVEL;
36
36
  })(LOG_LEVEL || (exports.LOG_LEVEL = LOG_LEVEL = {}));
37
37
  const getDefaultLogOptions = () => {
38
38
  return {
39
- stackSize: 1000
39
+ stackSize: 1000,
40
+ level: LOG_LEVEL.ALL
40
41
  };
41
42
  };
42
43
  exports.getDefaultLogOptions = getDefaultLogOptions;
@@ -63,6 +64,7 @@ class LogService extends BaseService_1.BaseService {
63
64
  if (!opt)
64
65
  opt = (0, exports.getDefaultLogOptions)();
65
66
  this.options = opt;
67
+ this.level = opt.level;
66
68
  }
67
69
  async init() {
68
70
  exports.REQ_LOG.listener = async (req) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",