@fonoster/logger 0.9.12 → 0.9.30

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.
package/dist/envs.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import winston from "winston";
2
- declare const LOGS_LEVEL: any;
2
+ declare const LOGS_LEVEL = "info";
3
3
  declare const fluent: any;
4
4
  declare const format: winston.Logform.Format;
5
5
  declare const transports: any[];
package/dist/envs.js CHANGED
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.transports = exports.level = exports.format = exports.fluent = void 0;
7
- /*
8
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
7
+ /**
8
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
9
9
  * http://github.com/fonoster/fonoster
10
10
  *
11
11
  * This file is part of Fonoster
package/dist/getEnv.d.ts CHANGED
@@ -1,2 +1,20 @@
1
- declare function getEnv(key: string, defaultValue?: any): any;
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ declare function getEnv<T = string>(key: string, defaultValue?: T): T;
2
20
  export { getEnv };
package/dist/getEnv.js CHANGED
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
- /*
3
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getEnv = getEnv;
4
+ /**
5
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
4
6
  * http://github.com/fonoster/fonoster
5
7
  *
6
8
  * This file is part of Fonoster
@@ -17,16 +19,13 @@
17
19
  * See the License for the specific language governing permissions and
18
20
  * limitations under the License.
19
21
  */
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.getEnv = getEnv;
22
- // Add a helper function that will check for a service-prefixed environment variable
23
- // For example, for key "LOGS_FORMAT" it will return process.env.APISERVER_LOGS_FORMAT if exists,
24
- // and fall back to process.env.LOGS_FORMAT otherwise.
25
22
  function getEnv(key, defaultValue) {
26
23
  // Look for any environment variable that is a service-prefixed variable (e.g. APISERVER_LOGS_FORMAT)
27
24
  const prefixedKey = Object.keys(process.env).find((envKey) => envKey !== key && envKey.endsWith(`_${key}`));
28
25
  if (prefixedKey !== undefined && process.env[prefixedKey] !== undefined) {
29
26
  return process.env[prefixedKey];
30
27
  }
31
- return process.env[key] !== undefined ? process.env[key] : defaultValue;
28
+ return process.env[key] !== undefined
29
+ ? process.env[key]
30
+ : defaultValue;
32
31
  }
package/dist/getLogger.js CHANGED
@@ -15,8 +15,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.getLogger = getLogger;
18
- /*
19
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
18
+ /**
19
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
20
20
  * http://github.com/fonoster/fonoster
21
21
  *
22
22
  * This file is part of Fonoster
package/dist/index.d.ts CHANGED
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { getLogger } from "./getLogger";
2
20
  import logger, { mute, unmute } from "./logger";
3
21
  import { ULogType } from "./types";
package/dist/index.js CHANGED
@@ -37,8 +37,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.unmute = exports.ulogger = exports.mute = exports.getLogger = exports.default = exports.ULogType = void 0;
40
- /*
41
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
40
+ /**
41
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
42
42
  * http://github.com/fonoster/fonoster
43
43
  *
44
44
  * This file is part of Fonoster
package/dist/logger.d.ts CHANGED
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import winston from "winston";
2
20
  declare const logger: winston.Logger;
3
21
  declare const mute: () => void;
package/dist/logger.js CHANGED
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.unmute = exports.mute = exports.default = void 0;
7
- /*
8
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
7
+ /**
8
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
9
9
  * http://github.com/fonoster/fonoster
10
10
  *
11
11
  * This file is part of Fonoster
package/dist/types.d.ts CHANGED
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  export interface ULog {
2
20
  accessKeyId: string;
3
21
  eventType: ULogType;
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.default = void 0;
7
- /*
8
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
7
+ /**
8
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
9
9
  * http://github.com/fonoster/fonoster
10
10
  *
11
11
  * This file is part of Fonoster
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/logger",
3
- "version": "0.9.12",
3
+ "version": "0.9.30",
4
4
  "description": "Logger module",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/fonoster#readme",
@@ -32,5 +32,5 @@
32
32
  "fluent-logger": "^3.4.1",
33
33
  "winston": "^3.13.0"
34
34
  },
35
- "gitHead": "f54a197806d36b9aa8832a9840186e4d24a0e317"
35
+ "gitHead": "620549f395f1207b0ee7a33aaee232e5498cf6d5"
36
36
  }