UNPKG

2.98 kBJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6var englishList = function englishList(arr) {
7 return arr.join(', ').replace(/, ([^,]+)$/g, ' and $1');
8};
9
10exports.default = {
11
12 duplicateLevelNums: function duplicateLevelNums(nums) {
13 return 'The custom levels included duplicate levels: ' + englishList(nums) + '.';
14 },
15
16 duplicateLevels: function duplicateLevels(names) {
17 return 'The custom levels included duplicate names: ' + englishList(names) + '.';
18 },
19
20 invalidLevelNum: function invalidLevelNum(num) {
21 return 'The custom levels object had the invalid level number ' + num + '.';
22 },
23
24 invalidToken: function invalidToken(token) {
25 return 'The opts.token property "' + token + '" does not appear to be valid.';
26 },
27
28 levelConflict: function levelConflict(name) {
29 return 'The custom level name ' + name + ' conflicts with a native property.';
30 },
31
32 levelNotString: function levelNotString(value) {
33 return 'The custom level value ' + value + ' is invalid.';
34 },
35
36 levelsNotObj: function levelsNotObj(type) {
37 return 'The opts.levels value is a ' + type + '.';
38 },
39
40 noOptions: function noOptions() {
41 return 'The options argument is missing.';
42 },
43
44 noToken: function noToken() {
45 return 'The opts.token property is missing.';
46 },
47
48 optionsNotObj: function optionsNotObj(type) {
49 return 'The options argument is a ' + type + '.';
50 },
51
52 tooManyLevels: function tooManyLevels(count) {
53 return 'The custom levels array had ' + count + ' members (max is 8).';
54 },
55
56 authError: function authError(err) {
57 return 'TLS authorization error: ' + (err || 'UNKNOWN') + '.';
58 },
59
60 bufferFull: function bufferFull(log) {
61 return 'Buffer is full, unable to log: "' + log.substr(0, 25) + ' ...".';
62 },
63
64 cannotConnect: function cannotConnect() {
65 return 'Unable to connect to host. Will attempt again in three minutes.';
66 },
67
68 noLogMessage: function noLogMessage() {
69 return 'Log method was called without a message argument.';
70 },
71
72 serializedEmpty: function serializedEmpty() {
73 return 'Log message argument existed, but serialized to an empty string.';
74 },
75
76 unknownLevel: function unknownLevel(level) {
77 return 'The log method was called with the unknown level "' + level + '".';
78 },
79
80 deprecatedLevelMethod: function deprecatedLevelMethod() {
81 return 'The `level` method is deprecated. Use the `minLevel` property, ' + 'which allows specifying level by either the name or the index.';
82 },
83
84 deprecatedWinstonMethod: function deprecatedWinstonMethod() {
85 return 'The `winston` method is deprecated. Winston was automatically ' + 'provisioned with a Logentries transport as soon as you `require()`d ' + 'this module.';
86 }
87};
88module.exports = exports['default'];
89//# sourceMappingURL=text.js.map