{"library":"ngrx-store-logger","title":"Ngrx Store Logger","description":"ngrx-store-logger is an advanced logging meta-reducer for NgRx applications, providing detailed console output of actions and state changes. It is a direct port of `redux-logger`, offering features like customizable log levels (log, warn, error, info), collapsed log groups, action/state transformation, and filtering by whitelist or blacklist. The package is currently at version 0.2.4 and lists peer dependencies for `@ngrx/store` up to `^8.0.0`. Given that NgRx is now in version 17+ and the last commit to the repository was in 2019, this package is considered unmaintained and deprecated for modern NgRx applications. Its release cadence was irregular, and it is no longer receiving updates to keep up with NgRx's rapid evolution.","language":"javascript","status":"abandoned","last_verified":"Thu Apr 23","install":{"commands":["npm install ngrx-store-logger"],"cli":null},"imports":["import { storeLogger } from 'ngrx-store-logger';","import { LoggerOptions } from 'ngrx-store-logger';","import { ActionReducer } from '@ngrx/store';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { StoreModule, ActionReducer } from '@ngrx/store';\nimport { storeLogger } from 'ngrx-store-logger';\nimport { environment } from '../environments/environment'; // Assume this exists for production check\n\ninterface State { /* Define your application state */ }\n\n// Dummy reducers for demonstration\nconst initialState: State = { /* initial state properties */ };\n\nfunction rootReducer(state: State | undefined, action: any): State {\n  if (state === undefined) return initialState;\n  // Handle actions and return new state\n  return state;\n}\n\nexport function logger(reducer: ActionReducer<State>): any {\n  // Initialize logger with default options or custom ones\n  return storeLogger({\n    collapsed: true, // Collapse log groups by default\n    duration: true, // Print duration with action\n    timestamp: true // Print timestamp with action\n  })(reducer);\n}\n\n// Conditionally apply logger only in development\nexport const metaReducers = !environment.production ? [logger] : [];\n\n@NgModule({\n  imports: [\n    BrowserModule,\n    StoreModule.forRoot(\n      rootReducer,\n      { metaReducers }\n    )\n  ],\n  declarations: [],\n  providers: [],\n  bootstrap: []\n})\nexport class AppModule {}\n","lang":"typescript","description":"This quickstart demonstrates how to integrate `ngrx-store-logger` into an Angular NgRx application as a meta-reducer, conditionally enabling it for non-production environments. It shows the necessary imports, how to wrap `storeLogger` in an exported function, and its inclusion in `StoreModule.forRoot`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}