@valkey/valkey-glide 1.1.0-rc10
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/README.md +39 -0
- package/build-ts/index.d.ts +11 -0
- package/build-ts/index.js +184 -0
- package/build-ts/src/BaseClient.d.ts +5126 -0
- package/build-ts/src/Commands.d.ts +1800 -0
- package/build-ts/src/Errors.d.ts +21 -0
- package/build-ts/src/GlideClient.d.ts +737 -0
- package/build-ts/src/GlideClusterClient.d.ts +1057 -0
- package/build-ts/src/Logger.d.ts +31 -0
- package/build-ts/src/ProtobufMessage.d.ts +2 -0
- package/build-ts/src/Transaction.d.ts +2997 -0
- package/package.json +67 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
|
|
3
|
+
*/
|
|
4
|
+
type LevelOptions = "error" | "warn" | "info" | "debug" | "trace";
|
|
5
|
+
export declare class Logger {
|
|
6
|
+
private static _instance;
|
|
7
|
+
private static logger_level;
|
|
8
|
+
private constructor();
|
|
9
|
+
/**
|
|
10
|
+
* take the arguments from the user and provide to the core-logger (see ../logger-core)
|
|
11
|
+
* if the level is higher then the logger level (error is 0, warn 1, etc.) simply return without operation
|
|
12
|
+
* if a logger instance doesn't exist, create new one with default mode (decided by rust core, normally - level: error, target: console)
|
|
13
|
+
* logIdentifier arg is a string contain data that suppose to give the log a context and make it easier to find certain type of logs.
|
|
14
|
+
* when the log is connect to certain task the identifier should be the task id, when the log is not part of specific task the identifier should give a context to the log - for example, "socket connection".
|
|
15
|
+
* External users shouldn't use this function.
|
|
16
|
+
*/
|
|
17
|
+
static log(logLevel: LevelOptions, logIdentifier: string, message: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* Initialize a logger if it wasn't initialized before - this method is meant to be used when there is no intention to replace an existing logger.
|
|
20
|
+
* The logger will filter all logs with a level lower than the given level,
|
|
21
|
+
* If given a fileName argument, will write the logs to files postfixed with fileName. If fileName isn't provided, the logs will be written to the console.
|
|
22
|
+
*/
|
|
23
|
+
static init(level?: LevelOptions, fileName?: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* configure the logger.
|
|
26
|
+
* the level argument is the level of the logs you want the system to provide (error logs, warn logs, etc.)
|
|
27
|
+
* the filename argument is optional - if provided the target of the logs will be the file mentioned, else will be the console
|
|
28
|
+
*/
|
|
29
|
+
static setLoggerConfig(level: LevelOptions, fileName?: string): void;
|
|
30
|
+
}
|
|
31
|
+
export {};
|