Externalize log level in configuration file.
This commit is contained in:
parent
877f77babd
commit
9910c0e0d3
@ -1,3 +1,5 @@
|
|||||||
|
import { Level } from '@nsalaun/ng-logger';
|
||||||
|
|
||||||
var operationsTmpl = require('./operations/operations.html');
|
var operationsTmpl = require('./operations/operations.html');
|
||||||
var accountsTmpl = require('./accounts/accounts.html');
|
var accountsTmpl = require('./accounts/accounts.html');
|
||||||
var schedulerTmpl = require('./scheduler/scheduler.html');
|
var schedulerTmpl = require('./scheduler/scheduler.html');
|
||||||
@ -26,3 +28,4 @@ export default function AppConfig($routeProvider) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const ApiBaseURL = "http://localhost:8080/api";
|
export const ApiBaseURL = "http://localhost:8080/api";
|
||||||
|
export const LogLevel = Level.LOG;
|
||||||
|
@ -9,18 +9,18 @@ import { BrowserModule } from '@angular/platform-browser';
|
|||||||
import { UpgradeModule } from '@angular/upgrade/static';
|
import { UpgradeModule } from '@angular/upgrade/static';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { NgLoggerModule, Level } from '@nsalaun/ng-logger';
|
import { NgLoggerModule } from '@nsalaun/ng-logger';
|
||||||
import { RestangularModule } from 'ngx-restangular';
|
import { RestangularModule } from 'ngx-restangular';
|
||||||
|
|
||||||
import { AccountModule } from './accounts/account.module';
|
import { AccountModule } from './accounts/account.module';
|
||||||
import { ApiBaseURL } from './app.config';
|
import { ApiBaseURL, LogLevel } from './app.config';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
UpgradeModule,
|
UpgradeModule,
|
||||||
AccountModule,
|
AccountModule,
|
||||||
NgLoggerModule.forRoot(Level.LOG),
|
NgLoggerModule.forRoot(LogLevel),
|
||||||
RestangularModule.forRoot((RestangularProvider) => {
|
RestangularModule.forRoot((RestangularProvider) => {
|
||||||
RestangularProvider.setBaseUrl(ApiBaseURL);
|
RestangularProvider.setBaseUrl(ApiBaseURL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user