Skip to content

Add setLogLevel() #3154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions packages/firestore/exp/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ export interface SnapshotMetadata {
isEqual(other: SnapshotMetadata): boolean;
}

export type LogLevel = 'debug' | 'error' | 'silent';
export type LogLevel =
| 'debug'
| 'error'
| 'silent'
| 'warn'
| 'info'
| 'verbose';

export function setLogLevel(logLevel: LogLevel): void;

Expand Down Expand Up @@ -169,10 +175,7 @@ export class Transaction {

get<T>(documentRef: DocumentReference<T>): Promise<DocumentSnapshot<T>>;

set<T>(
documentRef: DocumentReference<T>,
data: T,
): Transaction;
set<T>(documentRef: DocumentReference<T>, data: T): Transaction;
set<T>(
documentRef: DocumentReference<T>,
data: Partial<T>,
Expand All @@ -193,10 +196,7 @@ export class Transaction {
export class WriteBatch {
private constructor();

set<T>(
documentRef: DocumentReference<T>,
data: T,
): WriteBatch;
set<T>(documentRef: DocumentReference<T>, data: T): WriteBatch;
set<T>(
documentRef: DocumentReference<T>,
data: Partial<T>,
Expand Down
8 changes: 7 additions & 1 deletion packages/firestore/lite/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ export interface Settings {
ignoreUndefinedProperties?: boolean;
}

export type LogLevel = 'debug' | 'error' | 'silent';
export type LogLevel =
| 'debug'
| 'error'
| 'silent'
| 'warn'
| 'info'
| 'verbose';

export function setLogLevel(logLevel: LogLevel): void;

Expand Down
2 changes: 2 additions & 0 deletions packages/firestore/lite/index.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export {
serverTimestamp
} from './src/api/field_value';

export { setLogLevel } from '../src/util/log';

export function registerFirestore(): void {
_registerComponent(
new Component(
Expand Down