How to use the ngx-logger.LoggerModule.forRoot function in ngx-logger

To help you get started, we’ve selected a few ngx-logger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github atlasmap / atlasmap / ui / src / app / lib / atlasmap-data-mapper / data-mapper.module.ts View on Github external
export { MappingModel } from './models/mapping.model';
export { MappingSerializer } from './services/mapping-serializer.service';

import { ToErrorIconClassPipe } from './common/to-error-icon-class.pipe';
import { ApiXsrfInterceptor, ApiHttpXsrfTokenExtractor } from './services/api-xsrf.service';
import { FieldActionService } from './services/field-action.service';
import { FileManagementService } from './services/file-management.service';

export { DataMapperAppComponent } from './components/data-mapper-app.component';

export const typeaheadModuleForRoot: ModuleWithProviders = TypeaheadModule.forRoot();
export const tooltipModuleForRoot: ModuleWithProviders = TooltipModule.forRoot();
export const bsDropdownModuleForRoot: ModuleWithProviders = BsDropdownModule.forRoot();
export const httpClientXsrfModuleForRoot: ModuleWithProviders = HttpClientXsrfModule.withOptions(environment.xsrf);
export const alertModuleForRoot: ModuleWithProviders = AlertModule.forRoot();
export const loggerModuleForRoot: ModuleWithProviders = LoggerModule.forRoot(environment.ngxLoggerConfig);

// @dynamic
@NgModule({
  imports: [
    CommonModule,
    HttpClientModule,
    FormsModule,
    ReactiveFormsModule,
    typeaheadModuleForRoot,
    tooltipModuleForRoot,
    bsDropdownModuleForRoot,
    httpClientXsrfModuleForRoot,
    alertModuleForRoot,
    loggerModuleForRoot,
  ],
  declarations: [
github atlasmap / atlasmap / ui / src / app / lib / atlasmap-data-mapper / services / field-action.service.spec.ts View on Github external
beforeEach(() => {
    TestBed.resetTestEnvironment();
    TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
    TestBed.configureTestingModule({
      imports: [HttpClientModule, HttpClientTestingModule, LoggerModule.forRoot({ level: NgxLoggerLevel.DEBUG })],
      providers: [
        ErrorHandlerService,
        FieldActionService,
        NGXLogger,
      ],
    });
    jasmine.getFixtures().fixturesPath = 'base/test-resources/fieldActions';
    const service = TestBed.get(FieldActionService);
    ConfigModel.getConfig().logger = service.logger;
  });
github Texera / texera / core / new-gui / src / app / workspace / service / dynamic-schema / schema-propagation / schema-propagation.service.spec.ts View on Github external
beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [
        HttpClientTestingModule,
        LoggerModule.forRoot(undefined)
      ],
      providers: [
        { provide: OperatorMetadataService, useClass: StubOperatorMetadataService },
        JointUIService,
        WorkflowActionService,
        UndoRedoService,
        DynamicSchemaService,
        SchemaPropagationService
      ]
    });

    httpClient = TestBed.get(HttpClient);
    httpTestingController = TestBed.get(HttpTestingController);
  });
github atlasmap / atlasmap / ui / src / app / lib / atlasmap-data-mapper / components / toolbar / toolbar.component.spec.ts View on Github external
beforeEach(() => {
    TestBed.resetTestEnvironment();
    TestBed.initTestEnvironment(BrowserDynamicTestingModule,
      platformBrowserDynamicTesting());

    TestBed.configureTestingModule({
      imports: [HttpClientModule, HttpClientTestingModule, LoggerModule.forRoot({ level: NgxLoggerLevel.DEBUG })],
      providers: [
        ToolbarComponent,
        DocumentManagementService,
        ErrorHandlerService,
        FieldActionService,
        FileManagementService,
        InitializationService,
        MappingManagementService,
        NGXLogger
      ],
    });
    jasmine.getFixtures().fixturesPath = 'base/test-resources/inspected';
  });
github atlasmap / atlasmap / ui / src / app / lib / atlasmap-data-mapper / services / mapping-management.service.spec.ts View on Github external
beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [ LoggerModule.forRoot({level: NgxLoggerLevel.DEBUG}) ],
      providers: [
        ErrorHandlerService,
        MappingManagementService,
        NGXLogger,
      ],
    });
  });
github atlasmap / atlasmap / ui / src / app / lib / atlasmap-data-mapper / services / initialization.service.spec.ts View on Github external
beforeEach(() => {
    TestBed.resetTestEnvironment();
    TestBed.initTestEnvironment(BrowserDynamicTestingModule,
      platformBrowserDynamicTesting());

    TestBed.configureTestingModule({
      imports: [HttpClientModule, HttpClientTestingModule, LoggerModule.forRoot({ level: NgxLoggerLevel.DEBUG })],
      providers: [
        DocumentManagementService,
        ErrorHandlerService,
        FieldActionService,
        FileManagementService,
        InitializationService,
        MappingManagementService,
        NGXLogger,
      ],
    });
    jasmine.getFixtures().fixturesPath = 'base/test-resources/inspected';
  });
github dbfannin / ngx-logger / projects / demo / src / app / app.module.ts View on Github external
} from '@angular/material';
import { LoggerModule, NgxLoggerLevel } from 'ngx-logger';

import { AppComponent } from './app.component';
import { LogConfigComponent } from './log-config/log-config.component';
import { LoggerFormComponent } from './logger-form/logger-form.component';
import { HttpClientModule } from "@angular/common/http";

@NgModule({
  declarations: [AppComponent, LogConfigComponent, LoggerFormComponent],
  imports: [
    BrowserModule,
    HttpClientModule,
    BrowserAnimationsModule,
    ReactiveFormsModule,
    LoggerModule.forRoot({ level: NgxLoggerLevel.DEBUG }),
    MatButtonModule,
    MatCardModule,
    MatChipsModule,
    MatFormFieldModule,
    MatInputModule,
    MatToolbarModule,
    MatSelectModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {}