@adguard/filters-compiler 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,6 +9,7 @@ It is used in [FiltersRegistry].
9
9
  - [Schemas maintenance](#schemas-maintenance)
10
10
  - [Filters metadata](#filters-metadata)
11
11
  - [`@include` directive and its options](#include-directive)
12
+ - [Logging](#logging)
12
13
 
13
14
  ## Usage
14
15
 
@@ -238,5 +239,27 @@ where:
238
239
  @include ./input.txt /ignoreTrustLevel
239
240
  ```
240
241
 
242
+ ## Logging
243
+
244
+ In order for the compiler to write logs, you need to pass `logPath` to the `compile` function as the second argument:
245
+
246
+ ```javascript
247
+ compile = (path, logPath, reportFile, platformsPath, whitelist, blacklist, customPlatformsConfig)
248
+ ```
249
+
250
+ If the `logPath` argument is not passed, the log file will not be written. If the directory with the file does not exist, it will be created.
251
+
252
+ ### Log Levels
253
+
254
+ The logger supports the following log levels:
255
+
256
+ - `INFO`: General information about the process
257
+ - `WARN`: Warning messages that don't stop the process
258
+ - `ERROR`: Error messages indicating failures
259
+
260
+ ### Logger Initialization
261
+
262
+ The logger is initialized during compilation when a valid `logPath` is provided.
263
+
241
264
  [FiltersRegistry]: https://github.com/AdguardTeam/FiltersRegistry/
242
265
  [filters-metadata]: https://github.com/AdguardTeam/FiltersRegistry/blob/master/README.md#filters-metadata
package/dist/build.txt CHANGED
@@ -1 +1 @@
1
- version=3.1.0
1
+ version=3.1.1