@mantiq/logging 0.1.3 → 0.2.0-rc.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantiq/logging",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-rc.2",
|
|
4
4
|
"description": "Channel-based logging",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,16 +40,20 @@
|
|
|
40
40
|
"LICENSE"
|
|
41
41
|
],
|
|
42
42
|
"scripts": {
|
|
43
|
-
"build": "bun build ./src/index.ts --outdir ./dist --target bun",
|
|
43
|
+
"build": "bun build ./src/index.ts --outdir ./dist --target bun --packages=external",
|
|
44
44
|
"test": "bun test",
|
|
45
45
|
"typecheck": "tsc --noEmit",
|
|
46
46
|
"clean": "rm -rf dist"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"bun-types": "latest",
|
|
50
|
-
"typescript": "^5.7.0"
|
|
50
|
+
"typescript": "^5.7.0",
|
|
51
|
+
"@mantiq/core": "workspace:*"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
54
|
"@mantiq/core": "^0.1.0"
|
|
55
|
+
},
|
|
56
|
+
"mantiq": {
|
|
57
|
+
"provider": "LoggingServiceProvider"
|
|
54
58
|
}
|
|
55
59
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServiceProvider, ConfigRepository } from '@mantiq/core'
|
|
1
|
+
import { ServiceProvider, ConfigRepository, Application } from '@mantiq/core'
|
|
2
2
|
import type { LogConfig } from './contracts/Logger.ts'
|
|
3
3
|
import { LogManager } from './LogManager.ts'
|
|
4
4
|
import { LOGGING_MANAGER } from './helpers/log.ts'
|
|
@@ -37,7 +37,7 @@ export class LoggingServiceProvider extends ServiceProvider {
|
|
|
37
37
|
const config = c.make(ConfigRepository).get<LogConfig>('logging', DEFAULT_CONFIG)
|
|
38
38
|
|
|
39
39
|
// Resolve relative log paths to absolute from app base path
|
|
40
|
-
const basePath = this.app.basePath_()
|
|
40
|
+
const basePath = (this.app.make(Application as any) as Application).basePath_()
|
|
41
41
|
if (config.channels) {
|
|
42
42
|
for (const ch of Object.values(config.channels)) {
|
|
43
43
|
if (typeof ch.path === 'string' && !ch.path.startsWith('/')) {
|