change default max number
This commit is contained in:
Родитель
157c18fae8
Коммит
4def759128
|
@ -501,10 +501,10 @@ export class AnalyticsPluginTests extends AITestClass {
|
|||
const prop = baseData.properties;
|
||||
Assert.equal(-1, JSON.stringify(prop).indexOf("test message"), "log info is not included");
|
||||
|
||||
|
||||
let applelist = new Array(49).fill("apple");
|
||||
// check maxLength default value
|
||||
appInsights.config.expCfg.expLog = () => {
|
||||
return {logs: ['apple', 'apple', 'apple', 'apple', 'pear', 'banana']};
|
||||
return {logs: applelist.concat(['pear', 'banana'])};
|
||||
};;
|
||||
this.clock.tick(1);
|
||||
appInsights.trackException({error: new Error(), severityLevel: SeverityLevel.Critical});
|
||||
|
|
|
@ -68,7 +68,7 @@ const defaultValues: IConfigDefaults<IConfig&IConfiguration> = objDeepFreeze({
|
|||
enableDebug: cfgDfBoolean(),
|
||||
disableFlushOnBeforeUnload: cfgDfBoolean(),
|
||||
disableFlushOnUnload: cfgDfBoolean(false, "disableFlushOnBeforeUnload"),
|
||||
expCfg: cfgDfMerge<IExceptionConfig>({inclScripts: false, expLog: undefined, maxLogs: 5})
|
||||
expCfg: cfgDfMerge<IExceptionConfig>({inclScripts: false, expLog: undefined, maxLogs: 50})
|
||||
});
|
||||
|
||||
function _chkConfigMilliseconds(value: number, defValue: number): number {
|
||||
|
|
|
@ -18,7 +18,7 @@ export interface IExceptionConfig{
|
|||
* @returns {Object} An object with the following property:
|
||||
* - logs: An array of strings, where each string represents a log entry to be included in the telemetry.
|
||||
*
|
||||
* @property {number} maxLogs - Specifies the maximum number of logs that can be generated. If not explicitly set, it defaults to 5.
|
||||
* @property {number} maxLogs - Specifies the maximum number of logs that can be generated. If not explicitly set, it defaults to 50.
|
||||
*/
|
||||
expLog: () => { logs: string[] },
|
||||
maxLogs: number
|
||||
|
|
Загрузка…
Ссылка в новой задаче