@larablox/monolog 0.1.0 → 0.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.
Files changed (3) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +74 -0
  3. package/package.json +1 -1
package/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2011-2020 Jordi Boggiano
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is furnished
8
+ to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # Larablox Monolog - Logging for Roblox
2
+
3
+ A roblox-ts port of [Monolog](https://github.com/Seldaek/monolog), as
4
+ faithfully as the Roblox platform allows. Upstream Monolog sends logs to
5
+ files, sockets, inboxes, databases, and web services; this port ships only
6
+ what a Roblox place can actually back -- printing to the output console, and
7
+ discarding. See [`CLAUDE.md`](CLAUDE.md)'s "Not ported" section for the full,
8
+ maintained list of what didn't make the trip and why.
9
+
10
+ This package implements the same shape as PSR-3's
11
+ [`LoggerInterface`](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md)
12
+ (`LoggerInterface.ts`), so code written against it stays interoperable with
13
+ the concept even without a real `psr/log` package on this platform.
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install @larablox/monolog
19
+ ```
20
+
21
+ ## Basic Usage
22
+
23
+ ```ts
24
+ import { Logger } from "@larablox/monolog/out/Monolog/Logger";
25
+ import { RobloxConsoleHandler } from "@larablox/monolog/out/Monolog/Handler/RobloxConsoleHandler";
26
+ import { Level } from "@larablox/monolog/out/Monolog/Level";
27
+
28
+ // create a log channel
29
+ const log = new Logger("name");
30
+ log.pushHandler(new RobloxConsoleHandler({}, Level.Warning));
31
+
32
+ // add records to the log
33
+ log.warning("Foo");
34
+ log.error("Bar");
35
+ ```
36
+
37
+ There is no package-level barrel export -- `src/index.ts` explains why --
38
+ so consumers deep-import each class the way the example above does.
39
+
40
+ ## What's included
41
+
42
+ - `Logger`, `Level`, `LogRecord`, `Registry`, `Utils`, `ResettableInterface`
43
+ - Handlers: `NullHandler`, `RobloxConsoleHandler` (the output-console adaptation
44
+ of `PHPConsoleHandler`), and `TestHandler` for your own tests
45
+ - Formatters: `NormalizerFormatter`, `LineFormatter`, `JsonFormatter`,
46
+ `ScalarFormatter`
47
+ - Processors: `PsrLogMessageProcessor`, `ClosureContextProcessor`,
48
+ `IntrospectionProcessor`, `MemoryUsageProcessor`, `MemoryPeakUsageProcessor`,
49
+ `ProcessIdProcessor`, `TagProcessor`, `UidProcessor`
50
+ - Attributes: `WithMonologChannel`, `AsMonologProcessor`
51
+
52
+ ## Submitting bugs and feature requests
53
+
54
+ Bugs and feature requests are tracked on
55
+ [GitHub](https://github.com/larablox/monolog/issues).
56
+
57
+ ### Requirements
58
+
59
+ - TypeScript 5.x compiled with [roblox-ts](https://roblox-ts.com/) `^3.0`
60
+ - A Rojo-synced Roblox place to run the compiled output in
61
+
62
+ ### Framework Integration
63
+
64
+ [`larablox/framework`](https://github.com/larablox/framework)'s
65
+ `Illuminate\Log` is built on this package.
66
+
67
+ ### License
68
+
69
+ MIT, matching upstream Monolog.
70
+
71
+ ### Acknowledgements
72
+
73
+ This is a TypeScript/roblox-ts port of [Monolog](https://github.com/Seldaek/monolog)
74
+ by Jordi Boggiano, adapted to run on the Roblox platform as faithfully as it allows.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package.json",
3
3
  "name": "@larablox/monolog",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "description": "The Larablox port of Monolog.",
6
6
  "license": "MIT",
7
7
  "keywords": ["monolog", "logging", "larablox", "roblox-ts"],