Skip to content

Commit f19fde3

Browse files
committed
feat: 🎸 app insights driver
Azure Application Insights driver fully implemented
1 parent 577d91f commit f19fde3

15 files changed

+334
-874
lines changed

.angulardoc.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"repoId": "b020faf2-e451-41d6-9ec2-f3e1573539b3",
3+
"lastSync": 0
4+
}

README.md

+6-36
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,3 @@
1-
# AUTHORS SECTION
2-
3-
This section is meant to help log driver authors get started with this template.
4-
5-
> TODO: Remove this section when the repository is completely set up.
6-
7-
## Terraform the repository
8-
9-
To customize the repo and enable some pre-configure tools run the `init` script in the terminal at your root directory.
10-
11-
The `init` script will ask for the required information.
12-
13-
### Running the init script.
14-
15-
```bash
16-
npm run init
17-
# Or if you use yarn
18-
yarn run init
19-
```
20-
21-
## Replace TODOS
22-
23-
Search across the repository files and solve the TODO comments.
24-
25-
### Files with TODOS
26-
27-
- README.md (here)
28-
29-
> End of AUTHORS SECTION. Delete everything above
30-
311
# @ngworker/lumberjack-applicationinsights-driver
322

333
<p align="center">
@@ -71,8 +41,8 @@ TODO: Update the features of this driver
7141

7242
LumberjackApplicationinsightsDriver is published as the `@ngworker/lumberjack-applicationinsights-driver` package.
7343

74-
| Toolchain | Command |
75-
| ----------- | -------------------------------------------------- |
44+
| Toolchain | Command |
45+
| ----------- | ------------------------------------------------------------- |
7646
| Angular CLI | `ng add @ngworker/lumberjack-applicationinsights-driver` |
7747
| NPM CLI | `npm install @ngworker/lumberjack-applicationinsights-driver` |
7848
| Yarn CLI | `yarn add @ngworker/lumberjack-applicationinsights-driver` |
@@ -82,10 +52,10 @@ LumberjackApplicationinsightsDriver is published as the `@ngworker/lumberjack-ap
8252
`LumberjackApplicationinsightsDriver` has verified compatibility with the following packages versions.
8353

8454
| LumberjackApplicationinsightsDriver | Lumberjack | Another Package |
85-
| ------------------------ | -------------- | --------------- |
86-
| 2.0.x | ^2.0.0 | ^8.0.0 |
87-
| 1.2.x | >=2.0.0-rc.0 | ^7.4.1 |
88-
| 1.1.x | >=2.0.0-beta.3 | ^7.0.0 |
55+
| ----------------------------------- | -------------- | --------------- |
56+
| 2.0.x | ^2.0.0 | ^8.0.0 |
57+
| 1.2.x | >=2.0.0-rc.0 | ^7.4.1 |
58+
| 1.1.x | >=2.0.0-beta.3 | ^7.0.0 |
8959

9060
If the version you are using is not listed, please [raise an issue in our GitHub repository](https://github.com/ngworker/lumberjack-applicationinsights-driver/issues/new).
9161

angular.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"cli": {
4+
"analytics": false
5+
},
36
"version": 1,
47
"newProjectRoot": "libs",
58
"projects": {

apps/lumberjack-app/src/app/app-logger.service.ts

+30
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,34 @@ export class AppLogger extends ScopedLumberjackLogger<LogPayload> {
2121
forestOnFire = this.createCriticalLogger('The forest is on fire').build();
2222

2323
helloForest = this.createInfoLogger('HelloForest').withPayload(AppLogger.payload).build();
24+
25+
trace(message: string, payload: LogPayload): void {
26+
const builder = this.createTraceLogger(message).build();
27+
builder(payload);
28+
}
29+
30+
debug(message: string, payload: LogPayload): void {
31+
const builder = this.createDebugLogger(message).build();
32+
builder(payload);
33+
}
34+
35+
info(message: string, payload: LogPayload): void {
36+
const builder = this.createInfoLogger(message).build();
37+
builder(payload);
38+
}
39+
40+
error(message: string, payload: LogPayload): void {
41+
const builder = this.createErrorLogger(message).build();
42+
builder(payload);
43+
}
44+
45+
warning(message: string, payload: LogPayload): void {
46+
const builder = this.createWarningLogger(message).build();
47+
builder(payload);
48+
}
49+
50+
critical(message: string, payload: LogPayload): void {
51+
const builder = this.createCriticalLogger(message).build();
52+
builder(payload);
53+
}
2454
}

0 commit comments

Comments
 (0)