File tree Expand file tree Collapse file tree 8 files changed +18
-6
lines changed
actors/client/ActorClient Expand file tree Collapse file tree 8 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export default class ActorClient {
3535 this . communicationProtocol = communicationProtocol ;
3636 this . options = options ;
3737
38- let logger = new Logger ( this . options . loggerOptions ) ;
38+ const logger = new Logger ( this . options . loggerOptions ) ;
3939
4040 // Builder
4141 switch ( communicationProtocol ) {
Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ import AbstractActor from "./actors/runtime/AbstractActor";
1919import { Temporal } from "@js-temporal/polyfill" ;
2020import ActorProxyBuilder from "./actors/client/ActorProxyBuilder" ;
2121import ActorId from "./actors/ActorId" ;
22+ import { DaprClientOptions } from "./types/DaprClientOptions" ;
23+ import { LoggerOptions } from "./types/logger/LoggerOptions" ;
24+ import { LoggerService } from "./types/logger/LoggerService" ;
25+ import { ConsoleLoggerService } from "./logger/ConsoleLoggerService" ;
2226
2327export {
2428 DaprClient ,
@@ -29,4 +33,8 @@ export {
2933 ActorProxyBuilder ,
3034 CommunicationProtocolEnum ,
3135 Temporal ,
36+ DaprClientOptions ,
37+ LoggerOptions ,
38+ LoggerService ,
39+ ConsoleLoggerService ,
3240}
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ limitations under the License.
1313
1414import CommunicationProtocolEnum from "../../enum/CommunicationProtocol.enum" ;
1515import { DaprClientOptions } from "../../types/DaprClientOptions" ;
16- import { LoggerOptions } from "../../types/logger/LoggerOptions" ;
1716
1817export default interface IClient {
1918 getClient ( ) : any ;
Original file line number Diff line number Diff line change @@ -11,10 +11,12 @@ See the License for the specific language governing permissions and
1111limitations under the License.
1212*/
1313
14+ import { LoggerService } from "../types/logger/LoggerService" ;
15+
1416/**
1517 * ConsoleLoggerService uses the in-built console module to log messages.
1618 */
17- class ConsoleLoggerService implements LoggerService {
19+ export class ConsoleLoggerService implements LoggerService {
1820 error ( message : any , ...optionalParams : any [ ] ) : void {
1921 console . error ( `${ this . getTime ( ) } ERROR ${ message } ` , ...optionalParams ) ;
2022 }
Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ limitations under the License.
1212*/
1313
1414import { LoggerOptions } from "../types/logger/LoggerOptions" ;
15+ import { LoggerService } from "../types/logger/LoggerService" ;
1516import { LogLevel } from "../types/logger/LogLevel" ;
17+ import { ConsoleLoggerService } from "./ConsoleLoggerService" ;
1618
1719export class Logger {
1820 private readonly logLevel : LogLevel ;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ See the License for the specific language governing permissions and
1111limitations under the License.
1212*/
1313
14+ import { LoggerService } from "./LoggerService"
1415import { LogLevel } from "./LogLevel"
1516
1617/**
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ limitations under the License.
1414/**
1515 * LoggerService provides an interface to log SDK messages.
1616 */
17- interface LoggerService {
17+ export interface LoggerService {
1818
1919 /**
2020 * Write an 'error' level log.
You can’t perform that action at this time.
0 commit comments