@timberio/core
Advanced tools
Comparing version 0.34.1 to 0.34.2
@@ -16,3 +16,3 @@ "use strict"; | ||
// If true, errors/failed logs should be ignored | ||
ignoreExceptions: false, | ||
ignoreExceptions: false | ||
}; | ||
@@ -62,3 +62,3 @@ /** | ||
return { | ||
stack: e.stack, | ||
stack: e.stack | ||
}; | ||
@@ -65,0 +65,0 @@ } |
@@ -184,3 +184,3 @@ "use strict"; | ||
const base = new base_1.default("testing", "someSource", { | ||
ignoreExceptions: true, | ||
ignoreExceptions: true | ||
}); | ||
@@ -187,0 +187,0 @@ // Add a mock sync method which throws an error |
@@ -1,2 +0,2 @@ | ||
import { LogLevel, } from "@timberio/types"; | ||
import { LogLevel } from "@timberio/types"; | ||
import { makeBatch, makeThrottle } from "@timberio/tools"; | ||
@@ -14,3 +14,3 @@ // Set default options for Timber | ||
// If true, errors/failed logs should be ignored | ||
ignoreExceptions: false, | ||
ignoreExceptions: false | ||
}; | ||
@@ -60,3 +60,3 @@ /** | ||
return { | ||
stack: e.stack, | ||
stack: e.stack | ||
}; | ||
@@ -63,0 +63,0 @@ } |
@@ -179,3 +179,3 @@ import Base from "./base"; | ||
const base = new Base("testing", "someSource", { | ||
ignoreExceptions: true, | ||
ignoreExceptions: true | ||
}); | ||
@@ -182,0 +182,0 @@ // Add a mock sync method which throws an error |
{ | ||
"name": "@timberio/core", | ||
"version": "0.34.1", | ||
"version": "0.34.2", | ||
"description": "Timber.io - logging core", | ||
@@ -40,6 +40,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@timberio/tools": "^0.34.1", | ||
"@timberio/types": "^0.34.1" | ||
"@timberio/tools": "^0.34.2", | ||
"@timberio/types": "^0.34.2" | ||
}, | ||
"gitHead": "6f7c90e13c1df2812f44ef8f79f9a37f4b08246f" | ||
"gitHead": "ec0b79251c13ad3fb569e78daa7e032db965a266" | ||
} |
@@ -32,3 +32,3 @@ # 🌲 Timber - logging core | ||
sourceKey: string, | ||
options?: Partial<ITimberOptions>, | ||
options?: Partial<ITimberOptions> | ||
) { | ||
@@ -63,5 +63,5 @@ // Make sure you pass the organization API + source key to the parent constructor! | ||
"user-agent": { | ||
browser: "Chrome", | ||
}, | ||
}, | ||
browser: "Chrome" | ||
} | ||
} | ||
}); | ||
@@ -112,4 +112,4 @@ ``` | ||
id: 1000, | ||
name: "Lee", | ||
}, | ||
name: "Lee" | ||
} | ||
}; | ||
@@ -116,0 +116,0 @@ } |
@@ -105,3 +105,3 @@ import Base from "./base"; | ||
...log, | ||
message: newMessage, | ||
message: newMessage | ||
}; | ||
@@ -248,3 +248,3 @@ }); | ||
const base = new Base("testing", "someSource", { | ||
ignoreExceptions: true, | ||
ignoreExceptions: true | ||
}); | ||
@@ -251,0 +251,0 @@ |
@@ -7,3 +7,3 @@ import { | ||
Middleware, | ||
Sync, | ||
Sync | ||
} from "@timberio/types"; | ||
@@ -30,3 +30,3 @@ import { makeBatch, makeThrottle } from "@timberio/tools"; | ||
// If true, errors/failed logs should be ignored | ||
ignoreExceptions: false, | ||
ignoreExceptions: false | ||
}; | ||
@@ -73,3 +73,3 @@ | ||
sourceKey: string, | ||
options?: Partial<ITimberOptions>, | ||
options?: Partial<ITimberOptions> | ||
) { | ||
@@ -101,3 +101,3 @@ // First, check we have a valid API key | ||
this._options.batchSize, | ||
this._options.batchInterval, | ||
this._options.batchInterval | ||
); | ||
@@ -113,3 +113,3 @@ | ||
return { | ||
stack: e.stack, | ||
stack: e.stack | ||
}; | ||
@@ -149,3 +149,3 @@ } | ||
level: LogLevel = LogLevel.Info, | ||
context: TContext = {} as TContext, | ||
context: TContext = {} as TContext | ||
): Promise<ITimberLog & TContext> { | ||
@@ -169,3 +169,3 @@ // Check that we have a sync function | ||
// Add initial context | ||
...context, | ||
...context | ||
}; | ||
@@ -185,3 +185,3 @@ | ||
// Add error message | ||
message: message.message, | ||
message: message.message | ||
}; | ||
@@ -194,3 +194,3 @@ } else { | ||
// Add string message | ||
message, | ||
message | ||
}; | ||
@@ -202,3 +202,3 @@ } | ||
(fn, pipedLog) => fn.then(pipedLog), | ||
Promise.resolve(log as ITimberLog), | ||
Promise.resolve(log as ITimberLog) | ||
); | ||
@@ -233,3 +233,3 @@ | ||
message: Message, | ||
context: TContext = {} as TContext, | ||
context: TContext = {} as TContext | ||
) { | ||
@@ -249,3 +249,3 @@ return this.log(message, LogLevel.Debug, context); | ||
message: Message, | ||
context: TContext = {} as TContext, | ||
context: TContext = {} as TContext | ||
) { | ||
@@ -265,3 +265,3 @@ return this.log(message, LogLevel.Info, context); | ||
message: Message, | ||
context: TContext = {} as TContext, | ||
context: TContext = {} as TContext | ||
) { | ||
@@ -281,3 +281,3 @@ return this.log(message, LogLevel.Warn, context); | ||
message: Message, | ||
context: TContext = {} as TContext, | ||
context: TContext = {} as TContext | ||
) { | ||
@@ -284,0 +284,0 @@ return this.log(message, LogLevel.Error, context); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83964
Updated@timberio/tools@^0.34.2
Updated@timberio/types@^0.34.2