Skip to content

Commit

Permalink
docs: upgrade docs to notify of the deprication of modules
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoVazquez committed Jan 7, 2024
1 parent 9702c32 commit 529097a
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ The `sendLog` method has been optimized to run outside Angular's `NgZone`, avoid

### LumberjackHttpDriverModule

> Note: Lumberjack NgModules are deprecated and will be removed in version 18. Use the Standalone API, provider functions, instead.
The `LumberjackHttpDriverModule` is similar to the `LumberjackConsoleDriverModule`.

Novelty appears with the static `withOptions` function that allows us to pass `LumberjackHttpDriverOptions` to fall back to the settings in `LumberjackLogDriverConfig`.
Expand Down Expand Up @@ -232,6 +234,8 @@ The following is an example of how both API can be used

Classic:

> Note: Lumberjack NgModules are deprecated and will be removed in version 18. Use the Standalone API, provider functions, instead.
```typescript
@NgModule({
...,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Log drivers should make it possible to configure the logging levels on a per dri
For example, we could use the default logging levels for the console driver, but only enable the critical and error
levels for the HTTP driver as seen in the following example.

> Note: Lumberjack NgModules are deprecated and will be removed in version 18. Use the Standalone API, provider functions, instead.
```ts
import { NgModule } from '@angular/core';
import { LumberjackLevel, LumberjackModule } from '@ngworker/lumberjack';
Expand Down Expand Up @@ -269,6 +271,8 @@ export function provideLumberjackConsoleDriver(config: Partial<LumberjackConsole

The driver module then acts as a wrapper for the log driver and the provide function.

> Note: Lumberjack NgModules are deprecated and will be removed in version 18. Use the Standalone API, provider functions, instead.
```ts
import { ModuleWithProviders, NgModule } from '@angular/core';

Expand Down Expand Up @@ -321,6 +325,8 @@ Lumberjack at the same time.
The last step is to import this module at the root module of our application, as seen in the first [_Usage_](../usage)
section.

> Note: Lumberjack NgModules are deprecated and will be removed in version 18. Use the Standalone API, provider functions, instead.
```ts
@NgModule({
imports: [
Expand Down
4 changes: 4 additions & 0 deletions packages/docs/lumberjack-docs-app/docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ title: Usage
To register Lumberjack, add `LumberjackModule.forRoot()` to your root or core Angular module.

> Note: Lumberjack NgModules are deprecated and will be removed in version 18. Use the Standalone API, provider functions, instead.
```ts
// (...)
import {LumberjackModule} from '@ngworker/lumberjack';
Expand Down Expand Up @@ -38,6 +40,8 @@ You must also register the log driver modules for the log drivers that you want

If you want to add the `LumberjackHttpDriver` and the `LumberjackConsoleDriver`, add the following code

> Note: Lumberjack NgModules are deprecated and will be removed in version 18. Use the Standalone API, provider functions, instead.
```ts
// (...)
import { LumberjackModule } from '@ngworker/lumberjack';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { inject, NgModule } from '@angular/core';

/**
* Do not import directly. Use `LumberjackConsoleDriverModule.forRoot`.
* @deprecated Use standalone provider function `provideLumberjackConsoleDriver` instead.
* @deprecated Use standalone provider function `provideLumberjackConsoleDriver` instead. NgModules will be removed in Lumberjack 18.
*/
@NgModule()
export class LumberjackConsoleDriverRootModule {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { provideLumberjackConsoleDriver } from './provide-lumberjack-console-dri
* NOTE! Do not import `LumberjackConsoleDriverModule` directly. Use
* `LumberjackConsoleDriverModule.forRoot`.
*
* @deprecated Use standalone provider function `provideLumberjackConsoleDriver` instead.
* @deprecated Use standalone provider function `provideLumberjackConsoleDriver` instead. NgModules will be removed in Lumberjack 18.
*/
@NgModule()
export class LumberjackConsoleDriverModule {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { inject, NgModule } from '@angular/core';

/**
* Do not import directly. Use `LumberjackHttpDriverModule.forRoot`.
* @deprecated Use standalone provider function `provideLumberjackHttpDriver` instead.
* @deprecated Use standalone provider function `provideLumberjackHttpDriver` instead. NgModules will be removed in Lumberjack 18.
*/
@NgModule()
export class LumberjackHttpDriverRootModule {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import {
* `LumberjackHttpDriverModule.forRoot` or
* `LumberjackHttpDriverModule.withOptions`.
*
* @deprecated Use standalone provider function `provideLumberjackHttpDriver` instead.
* @deprecated Use standalone provider function `provideLumberjackHttpDriver` instead. NgModules will be removed in Lumberjack 18.
*
*/
@NgModule()
export class LumberjackHttpDriverModule {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { inject, NgModule } from '@angular/core';
/**
* Do not import directly. Use `LumberjackModule.forRoot`.
*
* @deprecated Use standalone provider function `provideLumberjack` instead.
* @deprecated Use standalone provider function `provideLumberjack` instead. NgModules will be removed in Lumberjack 18.
*/
@NgModule()
export class LumberjackRootModule {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { provideLumberjack } from './provide-lumberjack';
* NOTE! Do not import `LumberjackModule` directly. Use
* `LumberjackModule.forRoot`.
*
* @deprecated Use standalone provider function `provideLumberjack` instead.
* @deprecated Use standalone provider function `provideLumberjack` instead. NgModules will be removed in Lumberjack 18.
*/
@NgModule()
export class LumberjackModule {
Expand Down

0 comments on commit 529097a

Please sign in to comment.