You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+72-20Lines changed: 72 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,19 +31,42 @@ Logging component of <a href="https://purpleteam-labs.com/" title="purpleteam"><
31
31
32
32
_PurpleTeam_ logger wraps [`winston`](https://github.com/winstonjs/winston) for [_PurpleTeam_ components](https://github.com/purpleteam-labs/), provides a custom [`signale`](https://github.com/klauscfhq/signale) transport, and is open to be extended with additional transports.
33
33
34
+
purpleteam-logger is used heavily throughout most of the _PurpleTeam_ projects.
35
+
36
+
# Contents
37
+
38
+
*[Install](#install)
39
+
*[Usage](#usage)
40
+
*[Create a Reusable Logger](#create-a-reusable-logger)
@@ -63,18 +86,18 @@ a [combined format](https://github.com/winstonjs/winston#combining-formats) (`fo
63
86
64
87
and finally a `winston.transport.console` transport is added to the `transports` array property of the options object used to create the logger. This could be made more extensible.
You can specify the name of one or more transport constructors.
99
124
100
125
Using the [`SignaleTransport`](https://github.com/purpleteam-labs/purpleteam-logger/blob/main/src/transports/signale-transport.js) alone for example looks like the following:
If you want to add extra loggers after the default logger has been `init`ialised. See the [Winston docs](https://github.com/winstonjs/winston/tree/5758752f1a3f5b1bf71b750fc32771bdbd1366ce#working-with-multiple-loggers-in-winston) for more details.
@@ -155,7 +196,7 @@ If you supply an argument that is the name of a logger you have created previous
155
196
156
197
If no `options` are supplied to `add`, a new `options` object will be created using a transport of [`Console`](https://github.com/winstonjs/winston/blob/5758752f1a3f5b1bf71b750fc32771bdbd1366ce/docs/transports.md#console-transport), and the same `level` that the default logger has.
157
198
158
-
## Custom transport details
199
+
## Custom Transport Details
159
200
160
201
Currently `signale` is the only custom transport in the project, feel free to add additional transports.
161
202
The `signale` types can be seen at:
@@ -165,6 +206,17 @@ The `signale` types can be seen at:
165
206
166
207
Which utilise [figures](https://github.com/sindresorhus/figures/blob/master/index.js) for icons.
167
208
209
+
## Examples
210
+
211
+
There are many examples of how purpleteam-logger is being used in the [purpleteam-labs projects](https://github.com/purpleteam-labs) in both development and production environments. In particular the following projects would be a good place to start:
212
+
213
+
*[purpleteam (the CLI)](https://github.com/purpleteam-labs/purpleteam)
There are also [videos](https://purpleteam-labs.com/videos/) of purpleteam-logger in action.
219
+
168
220
## Contribution
169
221
170
222
Please open an [issue](https://github.com/purpleteam-labs/purpleteam/issues) to discus the proposed change before submitting a [pull request](https://github.com/purpleteam-labs/purpleteam-logger/pulls).
0 commit comments