@aristid/leav-types 1.4.1-95cadab0 → 1.4.1-9f9ebbe9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+ interface ICallerInfo {
2
+ path: string;
3
+ line: string;
4
+ col: string;
5
+ }
6
+ export declare class LoggerCallStack {
7
+ private callerLineIndexInStack;
8
+ getCallStackTrace(): string | null;
9
+ getLocationInfo(): ICallerInfo | null;
10
+ private getStackLines;
11
+ private detectCallLineIndexInStack;
12
+ private callStackTraceLongEnough;
13
+ }
14
+ export {};
@@ -0,0 +1,2 @@
1
+ import winston from 'winston';
2
+ export declare function catchErrorFormatter(onErrorLog?: (message: string, meta: any, getCallStackTrace: () => string) => void): winston.Logform.FormatWrap | null;
@@ -47,7 +47,7 @@ export interface ILoggerConfig {
47
47
  */
48
48
  version?: string;
49
49
  };
50
- onErrorLog?: (message: string, meta: any) => void;
50
+ onErrorLog?: (message: string, meta: any, getCallStackTrace: () => string) => void;
51
51
  }
52
52
  export declare function envToBool(value: string, defaultValue?: boolean): boolean;
53
53
  export declare const defaultLoggerConfig: ILoggerConfig & Required<Omit<ILoggerConfig, 'onErrorLog'>>;
@@ -0,0 +1,2 @@
1
+ import winston from 'winston';
2
+ export declare const addLocationInfoInLog: winston.Logform.FormatWrap;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aristid/leav-types",
3
- "version": "1.4.1-95cadab0",
3
+ "version": "1.4.1-9f9ebbe9",
4
4
  "description": "Shared Leav types",
5
5
  "scripts": {
6
6
  "tscheck": "",
@@ -1,9 +0,0 @@
1
- import winston from 'winston';
2
- interface ICallerInfo {
3
- path: string;
4
- line: string;
5
- col: string;
6
- }
7
- export declare function getLocationInfo(): ICallerInfo | null;
8
- export declare const addLocationInfoInLog: winston.Logform.FormatWrap;
9
- export {};