Skip to content

Commit c633cc8

Browse files
committed
[AUTOMATED]: Prettier Code Styling
1 parent f5ad492 commit c633cc8

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

packages/database/src/core/util/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { stringToByteArray } from '@firebase/util';
2727
import { stringify } from '@firebase/util';
2828
import { SessionStorage } from '../storage/storage';
2929
import { isNodeSdk } from '@firebase/util';
30-
import { Logger } from "@firebase/logger";
30+
import { Logger } from '@firebase/logger';
3131

3232
const logClient = new Logger();
3333

packages/firestore/src/util/log.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import { SDK_VERSION } from '../core/version';
2020
import { AnyJs } from './misc';
2121
import { PlatformSupport } from '../platform/platform';
22-
import { Logger, LogLevel as _LogLevel } from "@firebase/logger";
22+
import { Logger, LogLevel as _LogLevel } from '@firebase/logger';
2323

2424
const client = new Logger();
2525

@@ -33,12 +33,12 @@ export enum LogLevel {
3333
export function getLogLevel(): LogLevel {
3434
if (client.logLevel === _LogLevel.DEBUG) {
3535
return LogLevel.DEBUG;
36-
}
37-
36+
}
37+
3838
if (client.logLevel === _LogLevel.SILENT) {
3939
return LogLevel.SILENT;
4040
}
41-
41+
4242
return LogLevel.ERROR;
4343
}
4444
export function setLogLevel(newLevel: LogLevel): void {

packages/logger/src/logger.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ export const instances: Logger[] = [];
2929
/**
3030
* The JS SDK supports 5 log levels and also allows a user the ability to
3131
* silence the logs altogether.
32-
*
32+
*
3333
* The order is a follows:
3434
* DEBUG < VERBOSE < INFO < WARN < ERROR < SILENT
35-
*
35+
*
3636
* All of the log types above the current log level will be captured (i.e. if
37-
* I set the log level to `INFO`, errors will still be logged, but `DEBUG` and
37+
* I set the log level to `INFO`, errors will still be logged, but `DEBUG` and
3838
* `VERBOSE` logs will not)
3939
*/
4040
export enum LogLevel {
@@ -51,14 +51,22 @@ export enum LogLevel {
5151
* type of log, the current log level, and any other arguments passed (i.e. the
5252
* messages that the user wants to log) to this function.
5353
*/
54-
export type LogHandler = (logType: LogLevel, currentLogLevel: LogLevel, ...args: any[]) => void;
54+
export type LogHandler = (
55+
logType: LogLevel,
56+
currentLogLevel: LogLevel,
57+
...args: any[]
58+
) => void;
5559

5660
/**
5761
* The default log handler will forward DEBUG, VERBOSE, INFO, WARN, and ERROR
5862
* messages on to their corresponding console counterparts (if the log method
5963
* is supported by the current log level)
6064
*/
61-
const defaultLogHandler: LogHandler = (logType: LogLevel, currentLevel: LogLevel, ...args: any[]) => {
65+
const defaultLogHandler: LogHandler = (
66+
logType: LogLevel,
67+
currentLevel: LogLevel,
68+
...args: any[]
69+
) => {
6270
if (logType < currentLevel) return;
6371
switch (logType) {
6472
case LogLevel.SILENT:
@@ -80,7 +88,6 @@ const defaultLogHandler: LogHandler = (logType: LogLevel, currentLevel: LogLevel
8088
}
8189
};
8290

83-
8491
export class Logger {
8592
constructor() {
8693
/**

packages/logger/test/logger.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-

0 commit comments

Comments
 (0)