mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-01 07:11:23 +00:00
Initial Move from Azure DevOps to GitHub
This commit is contained in:
55
src/Contracts/Diagnostics.ts
Normal file
55
src/Contracts/Diagnostics.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* Trace level.
|
||||
*/
|
||||
export enum LogEntryLevel {
|
||||
/**
|
||||
* Custom events.
|
||||
*/
|
||||
Custom = -2,
|
||||
/**
|
||||
* Debug level.
|
||||
*/
|
||||
Debug = -1,
|
||||
/**
|
||||
* Verbose level.
|
||||
*/
|
||||
Verbose = 0,
|
||||
/**
|
||||
* Warning level.
|
||||
*/
|
||||
Warning = 1,
|
||||
/**
|
||||
* Error level.
|
||||
*/
|
||||
Error = 2
|
||||
}
|
||||
/**
|
||||
* Schema of a log entry.
|
||||
*/
|
||||
export interface LogEntry {
|
||||
/**
|
||||
* Timestamp
|
||||
*/
|
||||
timestamp: number;
|
||||
/**
|
||||
* Level
|
||||
*/
|
||||
level: LogEntryLevel;
|
||||
/**
|
||||
* Portal, etc
|
||||
*/
|
||||
area: string;
|
||||
/**
|
||||
* The message to be logged.
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
* The message code.
|
||||
*/
|
||||
code: number;
|
||||
/**
|
||||
* Any additional data to be logged.
|
||||
*/
|
||||
args?: any[];
|
||||
}
|
||||
export type LogMessage = string | Error;
|
||||
Reference in New Issue
Block a user