shamrickus commented on code in PR #7673: URL: https://github.com/apache/trafficcontrol/pull/7673#discussion_r1283535045
########## experimental/traffic-portal/src/app/shared/logging.service.ts: ########## @@ -0,0 +1,74 @@ +/** + * @license Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Injectable } from "@angular/core"; + +import { LogLevel, Logger } from "../utils"; + +/** + * LoggingService is for logging things in a consistent way across the UI. + * + * It's basically just a thin wrapper around a {@link Logger} so that only one + * instance needs to exist and injection makes its setup consistent across all + * usages. + */ +@Injectable({ + providedIn: "root" +}) +export class LoggingService { + + public logger: Logger; + + constructor() { + this.logger = new Logger(console, LogLevel.DEBUG, "", false); Review Comment: Shouldn't this `LogLevel` be dependent on the environment? Probably don't want debug statements in prod. ########## experimental/traffic-portal/src/app/shared/import-json-txt/import-json-txt.component.ts: ########## @@ -78,12 +79,14 @@ export class ImportJsonTxtComponent { * * @param dialogRef Dialog manager * @param alertService Alert service manager - * @param datePipe Default angular date pipe for formating date + * @param datePipe Default angular date pipe for formatting date Review Comment: This should probably read `formatting a date` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
